[dovecot-cvs] dovecot/src/lib ioloop-notify-dn.c,1.8,1.9

cras at dovecot.org cras at dovecot.org
Sat Oct 1 13:46:59 EEST 2005


Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv23614

Modified Files:
	ioloop-notify-dn.c 
Log Message:
Fixed fd leak



Index: ioloop-notify-dn.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/ioloop-notify-dn.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- ioloop-notify-dn.c	25 Sep 2005 11:12:24 -0000	1.8
+++ ioloop-notify-dn.c	1 Oct 2005 10:46:57 -0000	1.9
@@ -76,9 +76,10 @@
 		if (errno == EINVAL) {
 			/* dnotify not in kernel. disable it. */
 			ctx->disabled = TRUE;
-			return NULL;
+		} else {
+			i_error("fcntl(F_SETSIG) failed: %m");
 		}
-		i_error("fcntl(F_SETSIG) failed: %m");
+		(void)close(fd);
 		return NULL;
 	}
 	if (fcntl(fd, F_NOTIFY, DN_CREATE | DN_DELETE | DN_RENAME |



More information about the dovecot-cvs mailing list