common/params.cc: unlink tmp_path only if there's an error (#32145)

pull/32158/head
Dean Lee 1 year ago committed by GitHub
parent 9d1b3cc773
commit c1edc0901e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      common/params.cc

@ -273,7 +273,9 @@ int Params::put(const char* key, const char* value, size_t value_size) {
} while (false);
close(tmp_fd);
if (result != 0) {
::unlink(tmp_path.c_str());
}
return result;
}

Loading…
Cancel
Save