[PATCH BlueZ] src/adapter: Add the NULL check for response

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

 



From: Lee Hyuk <hyuk0512.lee@xxxxxxxxxxx>

The response can be NULL pointer. It should be checked.
---
 src/adapter.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/adapter.c b/src/adapter.c
index 3dac7d6..472b817 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -1227,6 +1227,9 @@ static void passive_scanning_complete(uint8_t status, uint16_t length,
 	struct btd_adapter *adapter = user_data;
 	const struct mgmt_cp_start_discovery *rp = param;
 
+	if (!rp)
+		return;
+
 	DBG("status 0x%02x", status);
 
 	if (length < sizeof(*rp)) {
-- 
1.9.1

--
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