mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-08 23:30:18 +01:00
Really fix dispatch_signal() segfault by removing signal handlers that were supposed to be removed from the internal signal handler list
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2170 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
bf03f244e8
commit
1afbd66971
1 changed files with 7 additions and 1 deletions
|
|
@ -1010,6 +1010,7 @@ nm_dbus_manager_remove_signal_handler (NMDBusManager *self,
|
|||
guint32 id)
|
||||
{
|
||||
GSList * elt;
|
||||
GSList * found_elt = NULL;
|
||||
SignalHandlerData * sig_handler = NULL;
|
||||
|
||||
g_return_if_fail (self != NULL);
|
||||
|
|
@ -1020,15 +1021,20 @@ nm_dbus_manager_remove_signal_handler (NMDBusManager *self,
|
|||
|
||||
if (handler && (handler->id == id)) {
|
||||
sig_handler = handler;
|
||||
found_elt = elt;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Not found */
|
||||
if (!sig_handler)
|
||||
if (!sig_handler || !found_elt)
|
||||
return;
|
||||
|
||||
/* Remove and free the signal handler */
|
||||
self->priv->signal_handlers = g_slist_remove_link (self->priv->signal_handlers,
|
||||
found_elt);
|
||||
free_signal_handler_data (sig_handler, self);
|
||||
g_slist_free_1 (found_elt);
|
||||
}
|
||||
|
||||
DBusConnection *
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue