From 27c076bbc93236ceca5f26343ae760571e9e845f Mon Sep 17 00:00:00 2001 From: Anderson Lizardo Date: Tue, 14 Feb 2012 12:06:02 -0400 Subject: [PATCH] device: Fix invalid memory read during GATT discovery device->browse should be set to NULL before calling browse_request_free(), otherwise it points to freed memory. --- src/device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/device.c b/src/device.c index 50ab339e7..b5815648b 100644 --- a/src/device.c +++ b/src/device.c @@ -2005,6 +2005,7 @@ int device_browse_primary(struct btd_device *device, DBusConnection *conn, BT_IO_OPT_INVALID); if (device->att_io == NULL) { + device->browse = NULL; browse_request_free(req); g_free(attcb); return -EIO; -- 2.47.3