Search the web
Sign In
New User? Sign Up
milter-greylist
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
fix a memory leak in acl.c   Message List  
Reply | Forward Message #4842 of 5385 |
Re: [milter-greylist] fix a memory leak in acl.c

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);



Mon Nov 10, 2008 4:54 am

mureninc@...
Send Email Send Email

Forward
Message #4842 of 5385 |
Expand Messages Author Sort by Date

Hello, The patch below fixes a memory leak that has been in milter-greylist since acl.c#rev1.41 (2006-12-29). The alarm was raised as 'Dead Store', 'dead...
Constantine A. Murenin
mureninc@...
Send Email
Nov 10, 2008
2:14 am

... Um, this is worth a 4.0.2 release :-) ... Do you have more bugs to be fixed in your queue? -- Emmanuel Dreyfus http://hcpnet.free.fr/pubz manu@......
manu@...
Send Email
Nov 10, 2008
3:59 am

... 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 ...
Constantine A. Murenin
mureninc@...
Send Email
Nov 10, 2008
4:54 am

... Hi, I see you've committed a different fix, but now indentation for "retval = 1;" is wrong. ;) C....
Constantine A. Murenin
mureninc@...
Send Email
Nov 10, 2008
3:48 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help