bluez5: free rfcomm when device is freed

Avoids use-after-free if device gets freed before the corresponding
rfcomm.
This commit is contained in:
Pauli Virtanen 2021-04-10 17:59:13 +03:00 committed by Wim Taymans
parent 0beb6bfc6c
commit 87aa18edb1
3 changed files with 33 additions and 11 deletions

View file

@ -675,6 +675,8 @@ static void device_free(struct spa_bt_device *device)
spa_log_debug(monitor->log, "%p", device);
spa_bt_device_emit_destroy(device);
battery_remove(device);
device_stop_timer(device);