From 6a86b0b081476c6eb90d3555041ad949a805a580 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Tue, 1 Jul 2008 22:39:33 +0300 Subject: [PATCH] SAP: remotely trigerrable memory leak (CID #70) --- modules/services_discovery/sap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/services_discovery/sap.c b/modules/services_discovery/sap.c index a666469609..4aa0f1fe72 100644 --- a/modules/services_discovery/sap.c +++ b/modules/services_discovery/sap.c @@ -808,7 +808,11 @@ static int ParseSAP( services_discovery_t *p_sd, const uint8_t *buf, 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++ ) { -- 2.39.2