mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-07 09:50:28 +01:00
manager: fix use-after-free crash for cdc-ether modems
An ethernet device that's actually a component of a modem could get added to the device list, but then destroyed without getting removed from the device list.
This commit is contained in:
parent
12aa505d3c
commit
85da54edd7
1 changed files with 2 additions and 2 deletions
|
|
@ -1203,8 +1203,6 @@ add_device (NMManager *self, NMDevice *device)
|
|||
gpointer value;
|
||||
gboolean managed = FALSE;
|
||||
|
||||
priv->devices = g_slist_append (priv->devices, device);
|
||||
|
||||
iface = nm_device_get_ip_iface (device);
|
||||
g_assert (iface);
|
||||
|
||||
|
|
@ -1213,6 +1211,8 @@ add_device (NMManager *self, NMDevice *device)
|
|||
return;
|
||||
}
|
||||
|
||||
priv->devices = g_slist_append (priv->devices, device);
|
||||
|
||||
g_signal_connect (device, "state-changed",
|
||||
G_CALLBACK (manager_device_state_changed),
|
||||
self);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue