Skip to content

Commit

Permalink
imap-send: minimum leakfix
Browse files Browse the repository at this point in the history
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
gitster committed Jun 4, 2024
1 parent b25ec8b commit 56f4f4a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions imap-send.c
Original file line number Diff line number Diff line change
Expand Up @@ -1543,6 +1543,7 @@ int cmd_main(int argc, const char **argv)
}

if (all_msgs.len == 0) {
strbuf_release(&all_msgs);
fprintf(stderr, "nothing to send\n");
return 1;
}
Expand Down

0 comments on commit 56f4f4a

Please sign in to comment.