File ivman-0.6.14-fdleak.patch of Package ivman

Index: src/daemonize.c
===================================================================
--- src/daemonize.c.orig	2006-02-10 02:20:51.000000000 +0100
+++ src/daemonize.c	2009-10-10 15:11:14.000000000 +0200
@@ -83,6 +83,7 @@ gboolean daemonize()
             return FALSE;
         }
         if (lockf(pid_fd, F_TLOCK, 0) < 0) {
+	    close(pid_fd);
             DEBUG(_("Failed to get a lock on lockfile %s: %s!"),
                   cfg_base->pidFile, strerror(errno));
             return FALSE;
@@ -91,6 +92,7 @@ gboolean daemonize()
 
         snprintf(str, sizeof(str), "%d\n", getpid());
         write(pid_fd, str, strlen(str));
+	close(pid_fd);
     }
 
     freopen("/dev/null", "r", stdin);
openSUSE Build Service is sponsored by