On Wed, 2006-03-01 at 03:44 -0500, Leif Jackson wrote:

> in lmtp.c around line 516:
> 
> /* find_bounded() allocated tmpaddr for us, and that's ok
>  * since dsnuser_free() will free it for us later on. */
> dsnuser.address = tmpaddr;
> 
> but the comment isn't true thus this leaks ? What do you guys want to do
> with this?
[snip]
>    /*
>    dm_free((char *) dsnuser->address);
>    dm_free((char *) dsnuser->mailbox);
>    */

These must have been commented out to combat static or multiple frees of
unduplicated strings in the mailbox and address fields... a better
solution would be to mandate that these fields are always assigned their
own copies of whatever.

A way better solution would be to add accessor functions that keep track
of this stuff and get rid of all the direct structure accesses.

This doesn't leak enough memory to be a problem if MAXCONNECTS is low.

Aaron


Reply via email to