INN commit: trunk/nnrpd (commands.c)

INN Commit rra at isc.org
Fri Oct 23 18:15:30 UTC 2009


    Date: Friday, October 23, 2009 @ 11:15:29
  Author: iulius
Revision: 8679

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

Modified:
  trunk/nnrpd/commands.c

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

Modified: commands.c
===================================================================
--- commands.c	2009-10-23 17:53:56 UTC (rev 8678)
+++ commands.c	2009-10-23 18:15:29 UTC (rev 8679)
@@ -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