mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-21 14:39:10 +00:00
Merge pull request #4006 from libgit2/cmn/compress-buf-free
Plug a leak in the refs compressor
This commit is contained in:
commit
1d683c1d2e
@ -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)
|
|||||||
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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user