]> git.sesse.net Git - vlc/commitdiff
ML: no need for asprintf here, strdup is enough.
authorRémi Duraffort <ivoire@videolan.org>
Mon, 21 Mar 2011 19:35:46 +0000 (20:35 +0100)
committerRémi Duraffort <ivoire@videolan.org>
Mon, 21 Mar 2011 19:37:46 +0000 (20:37 +0100)
modules/media_library/sql_search.c

index b78e9930b8d7043ece3c409226b9c6b350b2b6b5..fdd632a184aeef68faf2ca8431524e29179eb8f4 100644 (file)
@@ -956,7 +956,8 @@ static int BuildWhere( media_library_t* p_ml, char **ppsz_where, ml_ftree_t* tre
             if( i_ret != VLC_SUCCESS )
                 goto parsefail;
             /* 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;
                 goto parsefail;