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 nested assignment' by
LLVM/Clang Static Analyser, researched and fixed by myself. :-)
Cheers,
Constantine. cnst.su
Index: acl.c
===================================================================
RCS file: /milter-greylist/milter-greylist/acl.c,v
retrieving revision 1.83
diff -u -d -p -4 -r1.83 acl.c
--- acl.c 6 Nov 2008 11:23:53 -0000 1.83
+++ acl.c 10 Nov 2008 01:47:15 -0000
@@ -1657,12 +1657,8 @@ acl_register_entry_first(acl_stage, acl_
mg_log(LOG_DEBUG, "Drop ACL %d", conf_line - 1);
return NULL;
}
- if ((acl = malloc(sizeof(*acl))) == NULL) {
- mg_log(LOG_ERR, "ACL malloc failed: %s", strerror(errno));
- exit(EX_OSERR);
- }
acl = gacl;
acl->a_type = acl_type;
acl->a_stage = acl_stage;
acl->a_line = conf_line - 1;Message
fix a memory leak in acl.c
2008-11-10 by Constantine A. Murenin
Attachments
- No local attachments were found for this message.