mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-05 13:30:28 +01:00
bluetooth: don't crash when switching off bluetooth (rh #1059494)
When connected to a phone via bluetooth and turning bluetooth off on the
computer NetworkManegr crashed due to accessing invalid device.
Reproducer:
- activate bluetooth on a computer and a phone
- pair the devices
- $ nmcli con add type blue con-name phone bt-type panu addr 00:17:EA:84:E7:41
- turn off bluetooth on computer (either with a hardware or software switch)
https://bugzilla.redhat.com/show_bug.cgi?id=1059494
(cherry picked from commit 948a27257a)
This commit is contained in:
parent
aa1aa581e2
commit
063b2e7618
1 changed files with 3 additions and 1 deletions
|
|
@ -410,6 +410,8 @@ bluez_disconnect_cb (GDBusConnection *dbus_connection,
|
|||
g_error_free (error);
|
||||
} else
|
||||
g_variant_unref (variant);
|
||||
|
||||
g_object_unref (NM_BLUEZ_DEVICE (user_data));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -449,7 +451,7 @@ nm_bluez_device_disconnect (NMBluezDevice *self)
|
|||
10000,
|
||||
NULL,
|
||||
(GAsyncReadyCallback) bluez_disconnect_cb,
|
||||
self);
|
||||
g_object_ref (self));
|
||||
|
||||
priv->connection_bt_type = NM_BT_CAPABILITY_NONE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue