mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-04 18:56:59 +00:00
patch: memory leak of patch.base.diff_opts.new|old_prefix
This commit is contained in:
parent
8a349bf2a1
commit
b0014063b2
@ -451,8 +451,10 @@ int git_diff_foreach(
|
|||||||
|
|
||||||
if (binary_cb || hunk_cb || data_cb) {
|
if (binary_cb || hunk_cb || data_cb) {
|
||||||
if ((error = patch_generated_init(&patch, diff, idx)) != 0 ||
|
if ((error = patch_generated_init(&patch, diff, idx)) != 0 ||
|
||||||
(error = patch_generated_load(&patch, &xo.output)) != 0)
|
(error = patch_generated_load(&patch, &xo.output)) != 0) {
|
||||||
|
git_patch_free(&patch.base);
|
||||||
return error;
|
return error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((error = patch_generated_invoke_file_callback(&patch, &xo.output)) == 0) {
|
if ((error = patch_generated_invoke_file_callback(&patch, &xo.output)) == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user