On 09/11/2008, Constantine A. Murenin <mureninc@...> wrote:
> On Mon, Nov 10, 2008 at 04:59:41AM +0100, manu@... wrote:
> > Constantine A. Murenin <mureninc@...> wrote:
> >
> > > The patch below fixes a memory leak that has been in milter-greylist
> > > since acl.c#rev1.41 (2006-12-29).
> >
> > Um, this is worth a 4.0.2 release :-)
> >
> > > The alarm was raised as 'Dead Store', 'dead nested assignment' by
> > > LLVM/Clang Static Analyser, researched and fixed by myself. :-)
> >
> > Do you have more bugs to be fixed in your queue?
>
>
> There were some other things found, but no more memory leaks. :)
>
> The only other warning that might be worth fixing is the following:
>
> Index: macro.c
> ===================================================================
> RCS file: /milter-greylist/milter-greylist/macro.c,v
> retrieving revision 1.7
> diff -u -d -p -4 -r1.7 macro.c
> --- macro.c 6 Nov 2007 11:39:33 -0000 1.7
> +++ macro.c 10 Nov 2008 04:45:22 -0000
> @@ -84,9 +84,8 @@ macro_check(ad, stage, ap, priv)
> {
> SMFICTX *ctx;
> struct macro_entry *me;
> char *value;
> - int extended;
> int retval = 0;
>
> ctx = priv->priv_ctx;
> me = ad->macro;
> @@ -102,13 +101,11 @@ macro_check(ad, stage, ap, priv)
> if (value != NULL && strcmp(value, me->m_string) == 0)
> retval = 1;
> break;
> case M_REGEX:
> - if (value != NULL) {
> - extended = (conf.c_extendedregex ? REG_EXTENDED : 0);
> + if (value != NULL)
> if (regexec(me->m_regex, value, 0, NULL, 0) == 0)
> retval = 1;
> - }
> break;
> default:
> mg_log(LOG_ERR, "unexpecte me->m_type = %d", me->m_type);
> exit(EX_SOFTWARE);
Hi,
I see you've committed a different fix, but now indentation for
"retval = 1;" is wrong. ;)
C.Message
Re: [milter-greylist] fix a memory leak in acl.c
2008-11-10 by Constantine A. Murenin
Attachments
- No local attachments were found for this message.