]> git.sesse.net Git - vlc/commitdiff
* modules/access/http.c: backport of 11237
authorGildas Bazin <gbazin@videolan.org>
Wed, 1 Jun 2005 19:58:58 +0000 (19:58 +0000)
committerGildas Bazin <gbazin@videolan.org>
Wed, 1 Jun 2005 19:58:58 +0000 (19:58 +0000)
modules/access/http.c

index 84ed92c8d026bdd69440a69166e38b22d3bf8953..84b7c36c6d7d8afff2d8996199b89881fffab7cb 100644 (file)
@@ -275,17 +275,17 @@ static int Open( vlc_object_t *p_this )
         p_sys->b_proxy = VLC_TRUE;
         vlc_UrlParse( &p_sys->proxy, psz, 0 );
     }
+#ifdef HAVE_GETENV
     else
     {
-        char *psz_proxy = strdup(getenv( "http_proxy" ));
+        char *psz_proxy = getenv( "http_proxy" );
         if( psz_proxy && *psz_proxy )
         {
             p_sys->b_proxy = VLC_TRUE;
             vlc_UrlParse( &p_sys->proxy, psz_proxy, 0 );
         }
-        if( psz_proxy )
-            free( psz_proxy );
     }
+#endif
     free( psz );
 
     if( p_sys->b_proxy )