summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-09-06 21:14:55 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-09-06 21:14:55 +0000
commit92850fab067ab8ba636951eabbffaa590fd1d639 (patch)
treeb1fcf2467d2fcc16c82d07de35e57edd51389af1 /libmpdemux
parentc871483f14230da524d40fdf6a16f99fc3801d3f (diff)
downloadmpv-92850fab067ab8ba636951eabbffaa590fd1d639.tar.bz2
mpv-92850fab067ab8ba636951eabbffaa590fd1d639.tar.xz
memleak fixes when using an http proxy
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16420 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/network.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libmpdemux/network.c b/libmpdemux/network.c
index 40caa468d9..ac3ae06fe7 100644
--- a/libmpdemux/network.c
+++ b/libmpdemux/network.c
@@ -343,6 +343,7 @@ check4proxies( URL_t *url ) {
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 @@ check4proxies( URL_t *url ) {
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 );