]>
Commit | Line | Data |
---|---|---|
b135412d JR |
1 | From ab391138cacc62ab184a338e237c4430356b41f9 Mon Sep 17 00:00:00 2001 |
2 | From: Nick Schermer <nick@xfce.org> | |
3 | Date: Fri, 26 Apr 2013 20:05:10 +0200 | |
4 | Subject: Store the watch function id to avoid possible double free (bug | |
5 | #9709). | |
6 | ||
7 | --- | |
8 | xfce4-session/xfsm-startup.c | 7 ++++--- | |
9 | 1 file changed, 4 insertions(+), 3 deletions(-) | |
10 | ||
11 | diff --git a/xfce4-session/xfsm-startup.c b/xfce4-session/xfsm-startup.c | |
12 | index e43c53c..c621397 100644 | |
13 | --- a/xfce4-session/xfsm-startup.c | |
14 | +++ b/xfce4-session/xfsm-startup.c | |
15 | @@ -903,9 +903,10 @@ xfsm_startup_start_properties (XfsmProperties *properties, | |
16 | child_watch_data = g_new0 (XfsmStartupData, 1); | |
17 | child_watch_data->manager = g_object_ref (manager); | |
18 | child_watch_data->properties = properties; | |
19 | - g_child_watch_add_full (G_PRIORITY_LOW, properties->pid, | |
20 | - xfsm_startup_child_watch, child_watch_data, | |
21 | - (GDestroyNotify) xfsm_startup_data_free); | |
22 | + child_watch_data->properties->child_watch_id = | |
23 | + g_child_watch_add_full (G_PRIORITY_LOW, properties->pid, | |
24 | + xfsm_startup_child_watch, child_watch_data, | |
25 | + (GDestroyNotify) xfsm_startup_data_free); | |
26 | ||
27 | /* set a timeout -- client must register in a a certain amount of time | |
28 | * or it's assumed to be broken/have issues. */ | |
29 | -- | |
30 | 1.8.1 | |
31 |