[MPlayer-cvslog] r21551 - trunk/stream/network.c

reimar subversion at mplayerhq.hu
Sat Dec 9 19:54:13 CET 2006


Author: reimar
Date: Sat Dec  9 19:54:12 2006
New Revision: 21551

Modified:
   trunk/stream/network.c

Log:
Close fd on error.


Modified: trunk/stream/network.c
==============================================================================
--- trunk/stream/network.c	(original)
+++ trunk/stream/network.c	Sat Dec  9 19:54:12 2006
@@ -178,7 +178,7 @@
 	HTTP_header_t *http_hdr;
 	URL_t *server_url;
 	char str[256];
-	int fd;
+	int fd = -1;
 	int ret;
 	int proxy = 0;		// Boolean
 
@@ -245,6 +245,7 @@
 
 	return fd;
 err_out:
+	if (fd > 0) closesocket(fd);
 	http_free(http_hdr);
 	if (proxy && server_url)
 		url_free(server_url);



More information about the MPlayer-cvslog mailing list