OSSP CVS Repository

ossp - Check-in [3188]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 3188
Date: 2003-Feb-10 14:51:34 (local)
2003-Feb-10 13:51:34 (UTC)
User:thl
Branch:
Comment: plug two memory leaks
Tickets:
Inspections:
Files:
ossp-pkg/lmtp2nntp/lmtp2nntp_config.c      1.91 -> 1.92     1 inserted, 1 deleted
ossp-pkg/lmtp2nntp/lmtp2nntp_main.c      1.66 -> 1.67     4 inserted, 0 deleted

ossp-pkg/lmtp2nntp/lmtp2nntp_config.c 1.91 -> 1.92

--- lmtp2nntp_config.c   2003/02/06 10:51:40     1.91
+++ lmtp2nntp_config.c   2003/02/10 13:51:34     1.92
@@ -286,7 +286,7 @@
         }
 
         /* if only blocking ACLs exist, reserve space for two additional pass-through wildcards */
-        if ((ctx->pacl = (struct acl *)malloc((ov->ndata + somepass ? 0 : 2 ) * sizeof(struct acl))) == NULL) throw(0,0,0);
+        ctx->pacl = (struct acl *)mallocex((ov->ndata + somepass ? 0 : 2 ) * sizeof(struct acl));
 
         if (ov->ndata >= 1) {
             for (i = 0; i < ov->ndata; i++) {


ossp-pkg/lmtp2nntp/lmtp2nntp_main.c 1.66 -> 1.67

--- lmtp2nntp_main.c     2003/02/10 10:13:12     1.66
+++ lmtp2nntp_main.c     2003/02/10 13:51:34     1.67
@@ -714,6 +714,10 @@
         free(ctx->option_restrictheader);
     if (ctx->option_pidfile != NULL)
         free(ctx->option_pidfile);
+    if (ctx->pns != NULL)
+        free(ctx->pns);
+    if (ctx->pacl != NULL)
+        free(ctx->pacl);
     if (ctx->option_nodename != NULL)
         free(ctx->option_nodename);
     if (ctx->progname != NULL)

CVSTrac 2.0.1