mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-06-10 13:48:25 +02:00
device: fix ref leak in controller_release_port when detach completes synchronously
When detach_port() returns a value other than NM_TERNARY_DEFAULT,
the g_object_ref(port) passed as user_data for the async callback
is never released.
Fixes: 07dc237e5c ('device: wait port detach before leaving the DEACTIVATING state')
This commit is contained in:
parent
cb71852c20
commit
e7a211caa1
1 changed files with 2 additions and 0 deletions
|
|
@ -7278,6 +7278,8 @@ nm_device_controller_release_port(NMDevice *self,
|
|||
if (ret == NM_TERNARY_DEFAULT) {
|
||||
port_priv->port_detach_count++;
|
||||
port_priv->port_detach_reason = reason;
|
||||
} else {
|
||||
g_object_unref(port);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue