INN commit: branches/2.5/nnrpd (post.c)

INN Commit rra at isc.org
Sun Nov 15 09:24:25 UTC 2009


    Date: Sunday, November 15, 2009 @ 01:24:25
  Author: iulius
Revision: 8778

Fix a memory leak in the POST command when the Newsgroups:
header is invalid.

Modified:
  branches/2.5/nnrpd/post.c

--------+
 post.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Modified: post.c
===================================================================
--- post.c	2009-11-15 09:24:16 UTC (rev 8777)
+++ post.c	2009-11-15 09:24:25 UTC (rev 8778)
@@ -671,8 +671,10 @@
     p = HDR(HDR__CONTROL);
     IsNewgroup = (p && strncmp(p, "newgroup", 8) == 0);
     groups = xstrdup(hdr);
-    if ((p = strtok(groups, NGSEPS)) == NULL)
+    if ((p = strtok(groups, NGSEPS)) == NULL) {
+        free(groups);
 	return "Can't parse Newsgroups: header";
+    }
     Error[0] = '\0';
 
     /* Reject all articles with Approved: headers unless the user is allowed to




More information about the inn-committers mailing list