<<< Date Index >>>     <<< Thread Index >>>

Re: [PATCH] Fix memory leaks



Hi, 

On Thu, Jul 06, 2006 at 02:15:18PM +0000, Rocco Rutte wrote:
> attached is a patch fixing three memory leaks.
[...]
> valgrind(1) reports another one I'm not sure how to fix it: in 
> imap_new_idata() a new idata->cmdbuf BUFFER is allocated. In 
> mx_fastclose_mailbox() in mx.c the given CONTEXT containing the 
> idata->cmdbuf pointer is memset()'d to zero so the BUFFER will be 
> leaked. But that would mean we would have to free it in 
> imap_close_mailbox() and create a new idata for every opened IMAP 
> folder. Or maybe just mutt_buffer_free() it there... I don't know.

I am presumptious, I am afraid, but may I ask you to have a look
bug report #2195? I take it from your posting that you have a general (or even
detailed) idea of the data flow in mutt. I tried to have a go at bug #2195
myself, but I failed to understand why there is a double free() only if I send
both signed and encrypted messages and where the code needs a patch.

Thanks and regards

Christoph

-- 
FH Worms - University of Applied Sciences
Fachbereich Informatik / Telekommunikation
Erenburgerstr. 19, 67549 Worms, Germany