Re: [notmuch] [PATCH 2/2] * free the response data from 'prompt'

Subject: Re: [notmuch] [PATCH 2/2] * free the response data from 'prompt'

Date: Fri, 04 Dec 2009 11:18:36 -0800

To: Dirk-Jan C. Binnema, notmuch@notmuchmail.org

Cc:

From: Carl Worth


On Wed,  2 Dec 2009 09:11:25 +0200, "Dirk-Jan C. Binnema" <djcb.bulk@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@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
part-000.sig (application/pgp-signature)

Thread: