summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2024-06-05 04:35:26 -0400
committerJunio C Hamano <gitster@pobox.com>2024-06-07 10:32:53 -0700
commite3d2364c45bd8350e737faa6d0e2fbe2e583b03a (patch)
tree4362474dff6621d6fc8033071c58095c8865b3f8 /commit.c
parentf5598fcb7ba8588c78a8ab3212e94dc84155d137 (diff)
imap-send: free all_msgs strbuf in "out" label
We read stdin into a strbuf, but most code paths never release it, causing a leak (albeit a minor one, as we leak only when exiting from the main function of the program). Commit 56f4f4a29d (imap-send: minimum leakfix, 2024-06-04) did the minimum to plug the one instance we see in the test suite, when we read an empty input. But it was sufficient only because aside from this noop invocation, we don't test imap-send at all! The right spot to free is in the "out" label, which is hit by all code paths before leaving the function. We couldn't do that in 56f4f4a29d because there was no unified exit path. That came separately in 3aca5f7fb0 (imap-send: fix leaking memory in `imap_server_conf`, 2024-06-04), which cleaned up many other leaks (but not this one). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions