Commit 8f937a9b authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

SAP: remotely trigerrable memory leak (CID #70)

parent cd6310b9
...@@ -771,10 +771,15 @@ static int ParseSAP( services_discovery_t *p_sd, uint8_t *p_buffer, int i_read ) ...@@ -771,10 +771,15 @@ static int ParseSAP( services_discovery_t *p_sd, uint8_t *p_buffer, int i_read )
p_sd->p_sys->b_parse == VLC_FALSE ) p_sd->p_sys->b_parse == VLC_FALSE )
{ {
if( p_sdp->psz_uri ) free( p_sdp->psz_uri ); if( p_sdp->psz_uri ) free( p_sdp->psz_uri );
asprintf( &p_sdp->psz_uri, "sdp://%s", p_sdp->psz_sdp ); if( asprintf( &p_sdp->psz_uri, "sdp://%s", p_sdp->psz_sdp ) == -1 )
p_sdp->psz_uri = NULL;
} }
if( p_sdp->psz_uri == NULL ) return VLC_EGENERIC; if( p_sdp->psz_uri == NULL )
{
FreeSDP( p_sdp );
return VLC_EGENERIC;
}
for( i = 0 ; i< p_sd->p_sys->i_announces ; i++ ) for( i = 0 ; i< p_sd->p_sys->i_announces ; i++ )
{ {
......
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