Skip to content

Commit 56f4f4a

Browse files
committed
imap-send: minimum leakfix
EVen with the minimum "no-op" invocation t1517 makes, "git imap-send" leaks an empty strbuf it used to read a 0-byte string into. There are a few other topics cooking in 'next' that plugs many other leaks in this program, so let's minimally fix this one, barely enough to make CI pass, leaving the rest for the other topic. Helped-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b25ec8b commit 56f4f4a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

imap-send.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,6 +1543,7 @@ int cmd_main(int argc, const char **argv)
15431543
}
15441544

15451545
if (all_msgs.len == 0) {
1546+
strbuf_release(&all_msgs);
15461547
fprintf(stderr, "nothing to send\n");
15471548
return 1;
15481549
}

0 commit comments

Comments
 (0)