From: hyuk0512@gmail.com
To: linux-bluetooth@vger.kernel.org
Cc: Lee Hyuk <hyuk0512.lee@samsung.com>
Subject: [PATCH BlueZ] src/adapter: Add the NULL check for response
Date: Mon, 27 Mar 2017 10:18:27 +0900 [thread overview]
Message-ID: <1490577507-28351-2-git-send-email-hyuk0512@gmail.com> (raw)
In-Reply-To: <1490577507-28351-1-git-send-email-hyuk0512@gmail.com>
From: Lee Hyuk <hyuk0512.lee@samsung.com>
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
next prev parent reply other threads:[~2017-03-27 1:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170327011830epcas5p448d6a1d19f613c5962d386546fe9ecf5@epcas5p4.samsung.com>
2017-03-27 1:18 ` [PATCH BlueZ] src/adapter: Add the NULL check for response hyuk0512
2017-03-27 1:18 ` hyuk0512 [this message]
2017-03-27 10:54 ` Luiz Augusto von Dentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1490577507-28351-2-git-send-email-hyuk0512@gmail.com \
--to=hyuk0512@gmail.com \
--cc=hyuk0512.lee@samsung.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox