2008-09-30 Dan Williams <dcbw@redhat.com>

* 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



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4126 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2008-09-30 16:48:16 +00:00
parent 50f3ec27a2
commit 97f6070cfd
2 changed files with 12 additions and 2 deletions

View File

@@ -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;
}