[vlc-devel] [PATCH] stream: fix possible memory leak

Arjun Sreedharan arjun024 at gmail.com
Mon Aug 10 19:56:46 CEST 2015


free @s->p_sys on error

Signed-off-by: Arjun Sreedharan <arjun024 at gmail.com>
---
 src/input/stream_access.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/input/stream_access.c b/src/input/stream_access.c
index 26b97d8..03ce4f3 100644
--- a/src/input/stream_access.c
+++ b/src/input/stream_access.c
@@ -200,6 +200,7 @@ stream_t *stream_AccessNew( access_t *p_access )
     s->p_sys = p_sys = malloc( sizeof( *p_sys ) );
     if( !s->psz_url || !s->p_sys )
     {
+	free( s->p_sys );
         stream_CommonDelete( s );
         return NULL;
     }
-- 
2.4.5



More information about the vlc-devel mailing list