Commit 1d683c1d by Edward Thomson Committed by GitHub

Merge pull request #4006 from libgit2/cmn/compress-buf-free

Plug a leak in the refs compressor
parents a39f18ac 21e0fc32
......@@ -927,6 +927,7 @@ static int packed_remove_loose(refdb_fs_backend *backend)
continue;
if (error < 0) {
git_buf_free(&ref_content);
giterr_set(GITERR_REFERENCE, "failed to lock loose reference '%s'", ref->name);
return error;
}
......@@ -957,6 +958,7 @@ static int packed_remove_loose(refdb_fs_backend *backend)
p_unlink(lock.path_original);
}
git_buf_free(&ref_content);
git_filebuf_cleanup(&lock);
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