Commit ca1bdb86 authored by Laurent Aimar's avatar Laurent Aimar

Fixed a check on malloc failure in libvlc_media_get_tracks_info().

parent f103a7c2
...@@ -691,7 +691,7 @@ libvlc_media_get_tracks_info( libvlc_media_t *p_md, libvlc_media_track_info_t ** ...@@ -691,7 +691,7 @@ libvlc_media_get_tracks_info( libvlc_media_t *p_md, libvlc_media_track_info_t **
const int i_es = p_input_item->i_es; const int i_es = p_input_item->i_es;
*pp_es = (i_es > 0) ? malloc( i_es * sizeof(libvlc_media_track_info_t) ) : NULL; *pp_es = (i_es > 0) ? malloc( i_es * sizeof(libvlc_media_track_info_t) ) : NULL;
if( !pp_es ) /* no ES, or OOM */ if( !*pp_es ) /* no ES, or OOM */
{ {
vlc_mutex_unlock( &p_input_item->lock ); vlc_mutex_unlock( &p_input_item->lock );
return 0; return 0;
......
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