We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a349bf commit b001406Copy full SHA for b001406
src/patch_generate.c
@@ -451,8 +451,10 @@ int git_diff_foreach(
451
452
if (binary_cb || hunk_cb || data_cb) {
453
if ((error = patch_generated_init(&patch, diff, idx)) != 0 ||
454
- (error = patch_generated_load(&patch, &xo.output)) != 0)
+ (error = patch_generated_load(&patch, &xo.output)) != 0) {
455
+ git_patch_free(&patch.base);
456
return error;
457
+ }
458
}
459
460
if ((error = patch_generated_invoke_file_callback(&patch, &xo.output)) == 0) {
0 commit comments