Commit a7549358 authored by Rémi Duraffort's avatar Rémi Duraffort

ML: no need for asprintf here, strdup is enough.

parent 313c7ee3
...@@ -956,7 +956,8 @@ static int BuildWhere( media_library_t* p_ml, char **ppsz_where, ml_ftree_t* tre ...@@ -956,7 +956,8 @@ static int BuildWhere( media_library_t* p_ml, char **ppsz_where, ml_ftree_t* tre
if( i_ret != VLC_SUCCESS ) if( i_ret != VLC_SUCCESS )
goto parsefail; goto parsefail;
/* Ignore right parse tree as this is a special node */ /* Ignore right parse tree as this is a special node */
if( asprintf( ppsz_where, "%s", psz_left ? psz_left : "" ) == -1 ) *ppsz_where = strdup( psz_left ? psz_left : "" );
if( !*ppsz_where )
{ {
i_ret = VLC_ENOMEM; i_ret = VLC_ENOMEM;
goto parsefail; goto parsefail;
......
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