]> git.sesse.net Git - vlc/commitdiff
macosx: Fix a memleak.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 2 Aug 2008 13:59:41 +0000 (15:59 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 2 Aug 2008 13:59:41 +0000 (15:59 +0200)
(ivoire, I guess there are potentially a lot of interaction related memleak).

modules/gui/macosx/playlist.m

index 7598e4cc4a36579611f7fa9b3df2855ff68677ec..5e01eda7cbdf8c4d0308eb18b3a357497de148ad 100644 (file)
         _("Please enter a name for the new node."), &psz_name );
 
     PL_LOCK;
-    if( ret_v != DIALOG_CANCELLED && psz_name && *psz_name )
+    if( ret_v != DIALOG_CANCELLED && psz_name )
     {
         playlist_NodeCreate( p_playlist, psz_name,
                                       p_playlist->p_local_category, 0, NULL );
     }
     PL_UNLOCK;
 
+    free( psz_name );
     pl_Release( VLCIntf );
     [ourPool release];
 }