[MPlayer-cvslog] CVS: main/libmpdemux network.c,1.116,1.117

Reimar Döffinger CVS syncmail at mplayerhq.hu
Tue Sep 6 23:14:57 CEST 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv17083

Modified Files:
	network.c 
Log Message:
memleak fixes when using an http proxy


Index: network.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/network.c,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -r1.116 -r1.117
--- network.c	6 Sep 2005 21:00:57 -0000	1.116
+++ network.c	6 Sep 2005 21:14:55 -0000	1.117
@@ -343,6 +343,7 @@
 			if (network_ipv4_only_proxy && (gethostbyname(url->hostname)==NULL)) {
 				mp_msg(MSGT_NETWORK,MSGL_WARN,
 					"Could not find resolve remote hostname for AF_INET. Trying without proxy.\n");
+				url_free(proxy_url);
 				return url_out;
 			}
 #endif
@@ -352,11 +353,14 @@
 			new_url = malloc( len+1 );
 			if( new_url==NULL ) {
 				mp_msg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed\n");
+				url_free(proxy_url);
 				return url_out;
 			}
 			sprintf(new_url, "http_proxy://%s:%d/%s", proxy_url->hostname, proxy_url->port, url->url );
 			tmp_url = url_new( new_url );
 			if( tmp_url==NULL ) {
+				free( new_url );
+				url_free( proxy_url );
 				return url_out;
 			}
 			url_free( url_out );




More information about the MPlayer-cvslog mailing list