mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 04:40:09 +01:00
manager: ensure proper disposal of unrealized devices
When remove_device() is called on an already unrealized device, we should release it from master if necessary and clear its IP configurations to avoid leaks. https://bugzilla.redhat.com/show_bug.cgi?id=1433303 (cherry picked from commit2e0c3d1dac) (cherry picked from commit427a3e5cff)
This commit is contained in:
parent
42eb57c0c1
commit
f0eb192d8c
1 changed files with 5 additions and 0 deletions
|
|
@ -990,7 +990,12 @@ remove_device (NMManager *self,
|
|||
|
||||
g_signal_emit (self, signals[DEVICE_REMOVED], 0, device);
|
||||
_notify (self, PROP_DEVICES);
|
||||
} else {
|
||||
/* unrealize() does not release a slave device from master and
|
||||
* clear IP configurations, do it here */
|
||||
nm_device_removed (device, TRUE);
|
||||
}
|
||||
|
||||
g_signal_emit (self, signals[INTERNAL_DEVICE_REMOVED], 0, device);
|
||||
_notify (self, PROP_ALL_DEVICES);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue