[xiph-commits] r13257 - trunk/ezstream/src

moritz at svn.xiph.org moritz at svn.xiph.org
Fri Jul 13 18:20:46 PDT 2007


Author: moritz
Date: 2007-07-13 18:20:45 -0700 (Fri, 13 Jul 2007)
New Revision: 13257

Modified:
   trunk/ezstream/src/ezstream.c
Log:
Plug an fd leak, triggered by using -q.


Modified: trunk/ezstream/src/ezstream.c
===================================================================
--- trunk/ezstream/src/ezstream.c	2007-07-13 19:55:15 UTC (rev 13256)
+++ trunk/ezstream/src/ezstream.c	2007-07-14 01:20:45 UTC (rev 13257)
@@ -610,8 +610,11 @@
 		}
 		xfree(pCommandString);
 
-		if (qFlag)
+		if (qFlag) {
 			dup2(stderr_fd, fileno(stderr));
+			if (stderr_fd > 2)
+				close(stderr_fd);
+		}
 
 		return (filep);
 	}



More information about the commits mailing list