[Xfce4-commits] <xfce4-session:xfce-4.10> Store the watch function id to avoid possible double free (bug #9709).

Nick Schermer noreply at xfce.org
Sun May 5 17:36:03 CEST 2013


Updating branch refs/heads/xfce-4.10
         to 3ed422cb352b65bc7c4ff6d68b1ed89bd278464f (commit)
       from 801e7ee5458a0037cb6a7a548eeec73a74330db4 (commit)

commit 3ed422cb352b65bc7c4ff6d68b1ed89bd278464f
Author: Nick Schermer <nick at xfce.org>
Date:   Fri Apr 26 20:05:10 2013 +0200

    Store the watch function id to avoid possible double free (bug #9709).
    
    (cherry picked from commit ab391138cacc62ab184a338e237c4430356b41f9)

 xfce4-session/xfsm-startup.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/xfce4-session/xfsm-startup.c b/xfce4-session/xfsm-startup.c
index e43c53c..c621397 100644
--- a/xfce4-session/xfsm-startup.c
+++ b/xfce4-session/xfsm-startup.c
@@ -903,9 +903,10 @@ xfsm_startup_start_properties (XfsmProperties *properties,
   child_watch_data = g_new0 (XfsmStartupData, 1);
   child_watch_data->manager = g_object_ref (manager);
   child_watch_data->properties = properties;
-  g_child_watch_add_full (G_PRIORITY_LOW, properties->pid,
-                          xfsm_startup_child_watch, child_watch_data,
-                          (GDestroyNotify) xfsm_startup_data_free);
+  child_watch_data->properties->child_watch_id =
+      g_child_watch_add_full (G_PRIORITY_LOW, properties->pid,
+                              xfsm_startup_child_watch, child_watch_data,
+                              (GDestroyNotify) xfsm_startup_data_free);
 
   /* set a timeout -- client must register in a a certain amount of time
    * or it's assumed to be broken/have issues. */


More information about the Xfce4-commits mailing list