[vlc-commits] libvlc: delete preparser before interfaces

Thomas Guillem git at videolan.org
Thu Jun 2 10:57:27 CEST 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jun  2 10:53:06 2016 +0200| [9e9b227443831d8c9798b78122a2194053f2b2f1] | committer: Thomas Guillem

libvlc: delete preparser before interfaces

This fixes a use-after-free when the art fetcher was triggering a callback
registered by the playlist (that was destroyed).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9e9b227443831d8c9798b78122a2194053f2b2f1
---

 src/libvlc.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/libvlc.c b/src/libvlc.c
index 3468e0e..deb8a8d 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -508,6 +508,9 @@ void libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
 {
     libvlc_priv_t *priv = libvlc_priv (p_libvlc);
 
+    if (priv->parser != NULL)
+        playlist_preparser_Delete(priv->parser);
+
     /* Ask the interfaces to stop and destroy them */
     msg_Dbg( p_libvlc, "removing all interfaces" );
     libvlc_Quit( p_libvlc );
@@ -536,9 +539,6 @@ void libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
     }
 #endif
 
-    if (priv->parser != NULL)
-        playlist_preparser_Delete(priv->parser);
-
     vlc_DeinitActions( p_libvlc, priv->actions );
 
     /* Save the configuration */



More information about the vlc-commits mailing list