Commit 3369a0bf authored by Rémi Duraffort's avatar Rémi Duraffort

Playlist: fx missing unlocks (cid #1047159 and #1047160)

parent 4c2353ed
......@@ -459,7 +459,11 @@ int playlist_AddInput( playlist_t* p_playlist, input_item_t *p_input,
PL_LOCK_IF( !b_locked );
p_item = playlist_ItemNewFromInput( p_playlist, p_input );
if( p_item == NULL ) return VLC_ENOMEM;
if( p_item == NULL )
{
PL_UNLOCK_IF( !b_locked );
return VLC_ENOMEM;
}
AddItem( p_playlist, p_item,
b_playlist ? p_playlist->p_playing :
p_playlist->p_media_library , i_mode, i_pos );
......@@ -496,11 +500,13 @@ playlist_item_t * playlist_NodeAddInput( playlist_t *p_playlist,
PL_LOCK_IF( !b_locked );
p_item = playlist_ItemNewFromInput( p_playlist, p_input );
if( p_item == NULL ) return NULL;
if( p_item == NULL )
goto end;
AddItem( p_playlist, p_item, p_parent, i_mode, i_pos );
GoAndPreparse( p_playlist, i_mode, p_item );
end:
PL_UNLOCK_IF( !b_locked );
return p_item;
......
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