]> git.sesse.net Git - vlc/commitdiff
src/playlist: Fix a rare memleak that could happen when the interaction is created...
authorPierre d'Herbemont <pdherbemont@videolan.org>
Tue, 26 Feb 2008 01:37:34 +0000 (01:37 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Tue, 26 Feb 2008 01:37:34 +0000 (01:37 +0000)
src/playlist/engine.c
src/playlist/thread.c

index 05858a80a186469cc514a0303edf7efeb5f1bba3..e3af6b8f9c4dfa131bfadbfbb4ac8707b876b40e 100644 (file)
@@ -150,6 +150,12 @@ playlist_t * playlist_Create( vlc_object_t *p_parent )
     p_playlist->i_sort = SORT_ID;
     p_playlist->i_order = ORDER_NORMAL;
 
+
+    /* Interaction
+     * Init the interaction here, as playlist_MLLoad could trigger
+     * interaction init */
+    p_playlist->p_interaction = NULL;
+
     b_save = p_playlist->b_auto_preparse;
     p_playlist->b_auto_preparse = VLC_FALSE;
     playlist_MLLoad( p_playlist );
index caadd8cdcf23d7ace2cf65ddde9672ee7c4ddc86..fa6534074f6bbf5618bacd723bfe93df34c7105b 100644 (file)
@@ -65,9 +65,6 @@ void __playlist_ThreadCreate( vlc_object_t *p_parent )
     vlc_mutex_init( p_playlist, &p_playlist->p_stats->lock );
     p_playlist->p_stats_computer = NULL;
 
-    // Interaction
-    p_playlist->p_interaction = NULL;
-
     // Preparse
     p_playlist->p_preparse = vlc_object_create( p_playlist,
                                   sizeof( playlist_preparse_t ) );