From be0c1373499bbc480298429109124efbbe49f15a Mon Sep 17 00:00:00 2001 From: Luiz Augusto Von Dentz Date: Tue, 26 Jan 2010 16:17:21 +0200 Subject: [PATCH 1/6] Fix possible invalid read when removing a temporary device An invalid read may happens when doing the reverse service discovery but for some reason the device disconnects with the temporary flag set which will make the device to be removed without cancelling the service. --- src/device.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/device.c b/src/device.c index a2730ab..dfdacd8 100644 --- a/src/device.c +++ b/src/device.c @@ -239,6 +239,9 @@ static void device_free(gpointer user_data) if (device->disconn_timer) g_source_remove(device->disconn_timer); + if (device->discov_timer) + g_source_remove(device->discov_timer); + debug("device_free(%p)", device); g_free(device->authr); -- 1.6.3.3