lib: media_discoverer: release list after stop
authorThomas Guillem <thomas@gllm.fr>
Mon, 13 Jun 2016 11:24:33 +0000 (13:24 +0200)
committerThomas Guillem <thomas@gllm.fr>
Mon, 13 Jun 2016 11:25:43 +0000 (13:25 +0200)
since stop() can use the list to send events.

lib/media_discoverer.c

index d637189..55e5c95 100644 (file)
@@ -292,13 +292,13 @@ libvlc_media_discoverer_release( libvlc_media_discoverer_t * p_mdis )
                      services_discovery_removeall,
                      p_mdis );
 
-    libvlc_media_list_release( p_mdis->p_mlist );
-
     if( p_mdis->running )
         libvlc_media_discoverer_stop( p_mdis );
 
     vlc_sd_Destroy( p_mdis->p_sd );
 
+    libvlc_media_list_release( p_mdis->p_mlist );
+
     /* Free catname_to_submedialist and all the mlist */
     char ** all_keys = vlc_dictionary_all_keys( &p_mdis->catname_to_submedialist );
     for( i = 0; all_keys[i]; i++ )