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

stream_demux: fix memory leak on error

parent b45c28ec
...@@ -82,6 +82,7 @@ stream_t *stream_DemuxNew( demux_t *p_demux, const char *psz_demux, es_out_t *ou ...@@ -82,6 +82,7 @@ stream_t *stream_DemuxNew( demux_t *p_demux, const char *psz_demux, es_out_t *ou
s->p_sys = p_sys = malloc( sizeof( *p_sys) ); s->p_sys = p_sys = malloc( sizeof( *p_sys) );
if( !s->psz_path || !s->p_sys ) if( !s->psz_path || !s->p_sys )
{ {
free( p_sys );
stream_CommonDelete( s ); stream_CommonDelete( s );
return NULL; return NULL;
} }
......
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