Bluetooth: gatt: Fix possible NULL pointer dereference

Change-Id: Ica534a516725597c1fae8c8a9f652d85b720774c
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
This commit is contained in:
Mariusz Skamra 2015-11-10 16:11:10 +01:00 committed by Anas Nashif
commit 619ad22c38

View file

@ -1084,7 +1084,7 @@ static int att_find_info(struct bt_conn *conn,
int bt_gatt_discover(struct bt_conn *conn,
struct bt_gatt_discover_params *params)
{
if (!conn || !params->func || !params->start_handle ||
if (!conn || !params || !params->func || !params->start_handle ||
!params->end_handle || params->start_handle > params->end_handle) {
return -EINVAL;
}