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
This commit is contained in:
Junio C Hamano
2024-04-25 10:34:24 -07:00
14 changed files with 23 additions and 4 deletions

View File

@ -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;