[PATCH BlueZ 2/4] device: Fix invalid memory read during GATT discovery

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



device->browse should be set to NULL before calling
browse_request_free(), otherwise it points to freed memory.
---
 src/device.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/device.c b/src/device.c
index 50ab339..b581564 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;
-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux