]> git.sesse.net Git - vlc/commitdiff
Unbreak previous commit - I was a bit too optimistic
authorRémi Denis-Courmont <rem@videolan.org>
Sat, 25 Jun 2005 10:36:37 +0000 (10:36 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sat, 25 Jun 2005 10:36:37 +0000 (10:36 +0000)
include/network.h

index 67bec7bd3989494d2d4d09826a8f2a8d80474ad2..607e0687bd2266f9771a7199a153fc81ed3104f5 100644 (file)
@@ -125,7 +125,7 @@ static inline void vlc_UrlParse( vlc_url_t *url, const char *psz_url,
         char *p2;
 
         /* We have a host[:port] */
-        url->psz_host = psz_parse;
+        url->psz_host = strdup( psz_parse );
         if( p )
         {
             url->psz_host[p - psz_parse] = '\0';
@@ -176,6 +176,7 @@ static inline void vlc_UrlParse( vlc_url_t *url, const char *psz_url,
 static inline void vlc_UrlClean( vlc_url_t *url )
 {
     if( url->psz_buffer ) free( url->psz_buffer );
+    if( url->psz_host )   free( url->psz_host );
 
     url->psz_protocol = NULL;
     url->psz_username = NULL;