[Xfce4-commits] <xfce4-session:master> fix crash when properties are freed in failure handler (bug 5797)
Brian J. Tarricone
noreply at xfce.org
Mon Oct 19 02:26:01 CEST 2009
Updating branch refs/heads/master
to 76b1fea1a36401d8f9de1617e2f7e41348a63292 (commit)
from 9f4ad445477a523fdc2ff31043bb78199d7e347c (commit)
commit 76b1fea1a36401d8f9de1617e2f7e41348a63292
Author: Brian J. Tarricone <brian at tarricone.org>
Date: Sun Oct 18 17:24:44 2009 -0700
fix crash when properties are freed in failure handler (bug 5797)
xfce4-session/xfsm-startup.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/xfce4-session/xfsm-startup.c b/xfce4-session/xfsm-startup.c
index caa34f2..ddf6ad4 100644
--- a/xfce4-session/xfsm-startup.c
+++ b/xfce4-session/xfsm-startup.c
@@ -690,6 +690,9 @@ xfsm_startup_child_watch (GPid pid,
xfsm_verbose ("Client Id = %s, PID %d exited with status %d\n",
cwdata->properties->client_id, (gint)pid, status);
+ cwdata->properties->child_watch_id = 0;
+ cwdata->properties->pid = -1;
+
starting_properties = xfsm_manager_get_queue (cwdata->manager, XFSM_MANAGER_QUEUE_STARTING_PROPS);
if (g_queue_find (starting_properties, cwdata->properties) != NULL)
{
@@ -698,8 +701,9 @@ xfsm_startup_child_watch (GPid pid,
xfsm_startup_handle_failed_startup (cwdata->properties, cwdata->manager);
}
- cwdata->properties->child_watch_id = 0;
- cwdata->properties->pid = -1;
+ /* NOTE: cwdata->properties could have been freed by
+ * xfsm_startup_handle_failed_startup() above, so don't try to access
+ * any of its members here. */
g_spawn_close_pid (pid);
}
More information about the Xfce4-commits
mailing list