Commit e0b84ecd authored by Laurent Aimar's avatar Laurent Aimar Committed by Rémi Duraffort

Fixed a check on malloc failure in libvlc_media_get_tracks_info().

(cherry picked from commit ca1bdb8650fa6875cea42e76ff1d88e457e471ab)
Signed-off-by: default avatarRémi Duraffort <ivoire@videolan.org>
parent 92c977e2
...@@ -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