Re: [PATCH v2 1/2] imap-send: avoid leaking the tunnel command

From
Patrick Steinhardt <hidden>
Date
2026-10-21 08:25:01
Reply to
Harald Nordgren via GitGitGadget, 2026-10-21
On Wed, Oct 21, 2026 at 07:07:48AM +0000, Harald Nordgren via GitGitGadget wrote:
quoted hunk ↗ jump to hunk
diff --git a/imap-send.c b/imap-send.c
index bf1d2cf74d..6f76bade35 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -1176,6 +1176,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
 
 		imap->buf.sock.fd[0] = tunnel.out;
 		imap->buf.sock.fd[1] = tunnel.in;
+		child_process_clear(&tunnel);
This change plugs the memory leak, but the bigger question to me is why
we never call `finish_command()` on the child process at all. Is there a
reason for that?

Patrick
Thread (39 messages) 39 messages, 4 authors, last reply 4d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help