Merge branch 'sb/plug-misc-leaks'

Misc leak plugging.

* sb/plug-misc-leaks:
  sequencer.c: plug mem leak in git_sequencer_config
  sequencer.c: plug leaks in do_pick_commit
  submodule--helper: plug mem leak in print_default_remote
  refs/packed-backend.c: close fd of empty file
This commit is contained in:
Junio C Hamano
2018-06-25 13:22:41 -07:00
3 changed files with 6 additions and 2 deletions

View File

@ -176,6 +176,7 @@ static int git_sequencer_config(const char *k, const char *v, void *cb)
warning(_("invalid commit message cleanup mode '%s'"),
s);
free((char *)s);
return status;
}
@ -1774,7 +1775,8 @@ static int do_pick_commit(enum todo_command command, struct commit *commit,
res = do_recursive_merge(base, next, base_label, next_label,
&head, &msgbuf, opts);
if (res < 0)
return res;
goto leave;
res |= write_message(msgbuf.buf, msgbuf.len,
git_path_merge_msg(), 0);
} else {