Package: inetutils
Version: 1.5
Author: Guillem Jover <guillem@hadrons.org>
Status: applied
Description:
 Avoid leaking FILE instances when returning from init.


2006-10-21  Guillem Jover  <guillem@hadrons.org>

	* syslogd/syslogd.c (init): Close CF properly before returning.


Index: syslogd/syslogd.c
===================================================================
RCS file: /sources/inetutils/inetutils/syslogd/syslogd.c,v
retrieving revision 1.73
diff -u -r1.73 syslogd.c
--- syslogd/syslogd.c	12 Oct 2006 09:56:58 -0000	1.73
+++ syslogd/syslogd.c	21 Oct 2006 12:19:26 -0000
@@ -1656,6 +1656,7 @@
     {
       /* There is no graceful recovery here.  */
       dbg_printf ("cannot allocate space for configuration\n");
+      fclose (cf);
       return;
     }
   cline = cbuf;
@@ -1695,6 +1696,7 @@
 	    {
 	      /* Sigh ...  */
 	      dbg_printf ("cannot allocate space configuration\n");
+	      fclose (cf);
 	      free (cbuf);
 	      return;
 	    }
