On Fri, 10 Nov 2017 13:18:15 -0500
Robert Theisen <trob...@redhat.com> wrote:

> {
>     struct privdata *data;
>     char *val;
>     char buf[256];
>     if (*macro && *(macro+1)) {
>         /* Longer than 1 char -- use curlies */
>         snprintf(buf, sizeof(buf), "{%s}", macro);
>         val = smfi_getsymval(ctx, buf);
>     } else {
>         val = smfi_getsymval(ctx, macro);
>     }
>  ...
> }

> 
> at         snprintf(buf, sizeof(buf), "{%s}", macro);
> 
> that buf[256] is not getting cleaned up even though it is a local
> variable that is falling out of scope?

Um what?  There's nothing to clean up.  CLeaning that up simply
involves the C compiler incrementing the stack pointer by sizeof(buf);
it's an automatic variable.

> The strike against that theory would be that my memory dump shows that
> the "i" and "j" variables are included in that memory chunk.  But the
> single character i and j values are never copied to the local buf[256]
> variable.

If you're linking against a version of libmilter older than 8.14.4, the
library has a memory leak in it that could be causing this.

Regards,

Dianne.
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to