On Wed, 2 Dec 2009 09:11:25 +0200, "Dirk-Jan C. Binnema" <djcb.bulk at gmail.com> wrote: > Free the results of the prompt; this patch does the minimal job for that. > It may be nice to refactor the function a bit. > > Signed-off-by: Dirk-Jan C. Binnema <djcb.bulk at gmail.com>
Hi there, I pushed the first leak fix from this series, but the below is doing a little more work than necessary. The getline function is happy to accept a malloc'ed pointer and return it again if it's large enough, (or otherwise realloc it and return the result). So we don't need to free response between each call to prompt, but just after the last one. -Carl -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20091204/c03b8bc3/attachment.pgp>
