[gnome-settings-daemon/gnome-3-8] screensaver-proxy: Fix crash when client vanishes



commit 4f009795e9e8ad62de3d3d47427b3f593da974e4
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Sep 3 04:38:51 2013 +0200

    screensaver-proxy: Fix crash when client vanishes
    
    We were using the "sender" variable, which was gathered from the
    hash table, instead of using directly the argument passed to the
    function. As the sender variable was freed pretty much straight
    after it was removed from the cookies hashtable, we were accessing
    freed memory, usually leading to a crash.
    
    Reported in:
    https://trac.videolan.org/vlc/ticket/4739#comment:46

 .../gsd-screensaver-proxy-manager.c                |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/screensaver-proxy/gsd-screensaver-proxy-manager.c 
b/plugins/screensaver-proxy/gsd-screensaver-proxy-manager.c
index bcff3bd..f1590bc 100644
--- a/plugins/screensaver-proxy/gsd-screensaver-proxy-manager.c
+++ b/plugins/screensaver-proxy/gsd-screensaver-proxy-manager.c
@@ -180,7 +180,7 @@ name_vanished_cb (GDBusConnection            *connection,
                 }
         }
 
-        g_hash_table_remove (manager->priv->watch_ht, sender);
+        g_hash_table_remove (manager->priv->watch_ht, name);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]