[vlc-devel] [PATCH] notify: fix use after free

Emmanuel Nicolet emmanuel.nicolet at gmail.com
Sat Dec 28 12:04:46 CET 2019


---
 modules/notify/notify.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/notify/notify.c b/modules/notify/notify.c
index b3f52123b6..4f6a7e9b85 100644
--- a/modules/notify/notify.c
+++ b/modules/notify/notify.c
@@ -119,10 +119,10 @@ static int Open( vlc_object_t *p_this )
 
     if( !notify_init( APPLICATION_NAME ) )
     {
-        free( p_sys );
         vlc_player_Lock(player);
         vlc_player_RemoveListener(player, p_sys->player_listener);
         vlc_player_Unlock(player);
+        free( p_sys );
         msg_Err( p_intf, "can't find notification daemon" );
         return VLC_EGENERIC;
     }
-- 
2.24.1



More information about the vlc-devel mailing list