Memory leak (CID#266)
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Sun, 12 Oct 2008 08:07:51 +0000 (11:07 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Sun, 12 Oct 2008 08:07:51 +0000 (11:07 +0300)
modules/control/http/util.c

index 869b88a..6220d23 100644 (file)
@@ -352,10 +352,11 @@ void PlaylistListNode( intf_thread_t *p_intf, playlist_t *p_pl,
     {
         char value[512];
         char *psz;
-        mvar_t *itm = mvar_New( name, "set" );
         playlist_item_t * p_item = playlist_CurrentPlayingItem( p_pl );
         if( !p_item || !p_item->p_input )
             return;
+
+        mvar_t *itm = mvar_New( name, "set" );
         if( p_item->p_input->i_id == p_node->p_input->i_id )
             mvar_AppendNewVar( itm, "current", "1" );
         else