Re: [PATCH v2 1/2] imap-send: avoid leaking the tunnel command
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Oct 21, 2026, 08:24 UTC
- Message-ID
- <ath21xI1yLScKpuh@pks.im>
- In-Reply-To
- <b170b1f6d33d42b9441585fa8877a9e24d8d37a9.1792566469.git.gitgitgadget@gmail.com>
On Wed, Oct 21, 2026 at 07:07:48AM +0000, Harald Nordgren via GitGitGadget wrote:
Show 9 quoted lines
> 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