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



commit 7dc0b24883ae0b97b14e63b6d681abc9581ed432
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 9f36b63..0264809 100644
--- a/plugins/screensaver-proxy/gsd-screensaver-proxy-manager.c
+++ b/plugins/screensaver-proxy/gsd-screensaver-proxy-manager.c
@@ -179,7 +179,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]