[vlc-commits] notify: fix use after free

Emmanuel Nicolet git at videolan.org
Sat Dec 28 16:06:30 CET 2019


vlc | branch: master | Emmanuel Nicolet <emmanuel.nicolet at gmail.com> | Sat Dec 28 12:04:46 2019 +0100| [e8800760454c12c5635e077678a1b744210c92c1] | committer: Tristan Matthews

notify: fix use after free

Signed-off-by: Tristan Matthews <tmatth at videolan.org>

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

 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;
     }



More information about the vlc-commits mailing list