Commit c3ec36df authored by Laurent Aimar's avatar Laurent Aimar

Fixed small memory leaks.

parent 4b7a4213
...@@ -142,6 +142,7 @@ int E_(MMSHOpen)( access_t *p_access ) ...@@ -142,6 +142,7 @@ int E_(MMSHOpen)( access_t *p_access )
if( p_sys->url.psz_host == NULL || *p_sys->url.psz_host == '\0' ) if( p_sys->url.psz_host == NULL || *p_sys->url.psz_host == '\0' )
{ {
msg_Err( p_access, "invalid host" ); msg_Err( p_access, "invalid host" );
vlc_UrlClean( &p_sys->proxy );
vlc_UrlClean( &p_sys->url ); vlc_UrlClean( &p_sys->url );
free( p_sys ); free( p_sys );
return VLC_EGENERIC; return VLC_EGENERIC;
...@@ -151,6 +152,7 @@ int E_(MMSHOpen)( access_t *p_access ) ...@@ -151,6 +152,7 @@ int E_(MMSHOpen)( access_t *p_access )
if( Describe( p_access, &psz_location ) ) if( Describe( p_access, &psz_location ) )
{ {
vlc_UrlClean( &p_sys->proxy );
vlc_UrlClean( &p_sys->url ); vlc_UrlClean( &p_sys->url );
free( p_sys ); free( p_sys );
return VLC_EGENERIC; return VLC_EGENERIC;
...@@ -178,6 +180,7 @@ int E_(MMSHOpen)( access_t *p_access ) ...@@ -178,6 +180,7 @@ int E_(MMSHOpen)( access_t *p_access )
{ {
msg_Err( p_access, "cannot start stream" ); msg_Err( p_access, "cannot start stream" );
free( p_sys->p_header ); free( p_sys->p_header );
vlc_UrlClean( &p_sys->proxy );
vlc_UrlClean( &p_sys->url ); vlc_UrlClean( &p_sys->url );
free( p_sys ); free( p_sys );
return VLC_EGENERIC; return VLC_EGENERIC;
...@@ -199,6 +202,12 @@ void E_( MMSHClose )( access_t *p_access ) ...@@ -199,6 +202,12 @@ void E_( MMSHClose )( access_t *p_access )
access_sys_t *p_sys = p_access->p_sys; access_sys_t *p_sys = p_access->p_sys;
Stop( p_access ); Stop( p_access );
if( p_sys->p_header )
free( p_sys->p_header );
vlc_UrlClean( &p_sys->proxy );
vlc_UrlClean( &p_sys->url );
free( p_sys ); free( p_sys );
} }
...@@ -695,6 +704,8 @@ static void GetHeader( access_t *p_access ) ...@@ -695,6 +704,8 @@ static void GetHeader( access_t *p_access )
/* Read the asf header */ /* Read the asf header */
p_sys->i_header = 0; p_sys->i_header = 0;
if( p_sys->p_header )
free( p_sys->p_header );
p_sys->p_header = NULL; p_sys->p_header = NULL;
for( ;; ) for( ;; )
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment