git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 1/2] sequencer.c: plug leaks in do_pick_commit
@ 2018-06-01 20:01 Stefan Beller
  2018-06-01 20:01 ` [PATCH 2/2] sequencer.c: plug mem leak in git_sequencer_config Stefan Beller
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Beller @ 2018-06-01 20:01 UTC (permalink / raw)
  To: Johannes.Schindelin; +Cc: git, Stefan Beller

Going to leave, we additionally free the author and commit message
and make sure to call update_abort_safety_file().

Signed-off-by: Stefan Beller <sbeller@google.com>
---

This patch can apply on master.

This is a follow up from 
https://public-inbox.org/git/nycvar.QRO.7.76.6.1805311402210.82@tvgsbejvaqbjf.bet/



 sequencer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sequencer.c b/sequencer.c
index cca968043ea..b98690ecd41 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -1773,7 +1773,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 {
-- 
2.17.0.582.gccdcbd54c44.dirty


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-06-21 11:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-01 20:01 [PATCH 1/2] sequencer.c: plug leaks in do_pick_commit Stefan Beller
2018-06-01 20:01 ` [PATCH 2/2] sequencer.c: plug mem leak in git_sequencer_config Stefan Beller
2018-06-04  2:41   ` Junio C Hamano
2018-06-04  3:44     ` Junio C Hamano
2018-06-04  3:56       ` Jeff King
2018-06-04  4:26         ` Junio C Hamano
2018-06-04  4:51           ` Jeff King
2018-06-04  4:55             ` Junio C Hamano
2018-06-21  7:03             ` Johannes Schindelin
2018-06-21 11:46               ` Jeff King
2018-06-04  5:00         ` Jeff King

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).