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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Jun 4, 2024 at 11:46 UTC 56f4f4a29d32e177ef9af0907a17e431e8b3737e
1 file changed +1
imap-send.c
+1
@@ -1543,6 +1543,7 @@ int cmd_main(int argc, const char **argv)
1543 }
1544
1545 if (all_msgs.len == 0) {
1546 + strbuf_release(&all_msgs);
1547 fprintf(stderr, "nothing to send\n");
1548 return 1;
1549 }