diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-04-25 10:34:24 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-04-25 10:34:24 -0700 |
| commit | e326e520101dcf43a0499c3adc2df7eca30add2d (patch) | |
| tree | 0ccc11db7a48e18541d6dd4556d0a59c09f80770 /apply.c | |
| parent | c9d1ee7cdf08f8915ed4fdd9571ecf901d074e85 (diff) | |
| parent | 16727404c48ba1c2f43fb966276aee0b8cb24389 (diff) | |
| download | git-e326e520101dcf43a0499c3adc2df7eca30add2d.tar.xz | |
Merge branch 'rj/add-i-leak-fix'
Leakfix.
* rj/add-i-leak-fix:
add: plug a leak on interactive_add
add-patch: plug a leak handling the '/' command
add-interactive: plug a leak in get_untracked_files
apply: plug a leak in apply_data
Diffstat (limited to 'apply.c')
| -rw-r--r-- | apply.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -3712,8 +3712,10 @@ static int apply_data(struct apply_state *state, struct patch *patch, fprintf(stderr, _("Falling back to direct application...\n")); /* Note: with --reject, apply_fragments() returns 0 */ - if (patch->direct_to_threeway || apply_fragments(state, &image, patch) < 0) + if (patch->direct_to_threeway || apply_fragments(state, &image, patch) < 0) { + clear_image(&image); return -1; + } } patch->result = image.buf; patch->resultsize = image.len; |
