Commit 21e0fc32 by Carlos Martín Nieto

Plug a leak in the refs compressor

parent 904e1e75
...@@ -927,6 +927,7 @@ static int packed_remove_loose(refdb_fs_backend *backend) ...@@ -927,6 +927,7 @@ static int packed_remove_loose(refdb_fs_backend *backend)
continue; continue;
if (error < 0) { if (error < 0) {
git_buf_free(&ref_content);
giterr_set(GITERR_REFERENCE, "failed to lock loose reference '%s'", ref->name); giterr_set(GITERR_REFERENCE, "failed to lock loose reference '%s'", ref->name);
return error; return error;
} }
...@@ -957,6 +958,7 @@ static int packed_remove_loose(refdb_fs_backend *backend) ...@@ -957,6 +958,7 @@ static int packed_remove_loose(refdb_fs_backend *backend)
p_unlink(lock.path_original); p_unlink(lock.path_original);
} }
git_buf_free(&ref_content);
git_filebuf_cleanup(&lock); git_filebuf_cleanup(&lock);
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment