diff --git a/ChangeLog b/ChangeLog index d46f807251..b084347105 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-09-30 Dan Williams + + * src/NetworkManagerPolicy.c + - (lookup_thread_worker): don't store the idle handler ID becuase the + idle handler could have already run and freed the LookupThread + structure + 2008-09-30 Tambet Ingo * src/nm-device.c (nm_device_get_priority): Implement. diff --git a/src/NetworkManagerPolicy.c b/src/NetworkManagerPolicy.c index b8d5faae96..d5fb78a60a 100644 --- a/src/NetworkManagerPolicy.c +++ b/src/NetworkManagerPolicy.c @@ -58,7 +58,6 @@ struct LookupThread { guint32 ip4_addr; char hostname[NI_MAXHOST + 1]; - guint done_id; LookupCallback callback; gpointer user_data; }; @@ -110,7 +109,11 @@ lookup_thread_worker (gpointer data) thread->hostname[i] = tolower (thread->hostname[i]); } - thread->done_id = g_idle_add (lookup_thread_run_cb, thread); + /* Don't track the idle handler ID because by the time the g_idle_add() + * returns the ID, the handler may already have run and freed the + * LookupThread. + */ + g_idle_add (lookup_thread_run_cb, thread); return (gpointer) TRUE; }