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

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


    Date: Sunday, November 15, 2009 @ 01:19:15
  Author: iulius
Revision: 8755

Missing to deallocate grouplist when an error occurs when
accessing the active file.

Modified:
  branches/2.5/nnrpd/commands.c

------------+
 commands.c |    6 ++++++
 1 file changed, 6 insertions(+)

Modified: commands.c
===================================================================
--- commands.c	2009-11-15 09:18:50 UTC (rev 8754)
+++ commands.c	2009-11-15 09:19:15 UTC (rev 8755)
@@ -537,6 +537,12 @@
     if ((qp = QIOopen(ACTIVE)) == NULL) {
 	syslog(L_ERROR, "%s can't fopen %s %m", Client.host, ACTIVE);
 	Reply("%d Can't open active file\r\n", NNTP_FAIL_ACTION);
+
+        for (i = 0; i < numgroups; i++) {
+            free(grouplist[i].name);
+        }
+        free(grouplist);
+
 	return;
     }
     qsort(grouplist, numgroups, sizeof(GROUPDATA), GroupCompare);




More information about the inn-committers mailing list