From 85afc7c241689e022cd83225a21854cc422170e0 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 12 Nov 2015 14:45:59 +0200 Subject: [PATCH] tools/l2cap-tester: Fix NULL-dereference for tests with no data --- tools/l2cap-tester.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/l2cap-tester.c b/tools/l2cap-tester.c index 277be8c26..3ffe28377 100644 --- a/tools/l2cap-tester.c +++ b/tools/l2cap-tester.c @@ -794,7 +794,7 @@ static void setup_powered_client(const void *test_data) bthost_set_connect_cb(bthost, send_rsp_new_conn, data); } - if (test->direct_advertising) + if (test && test->direct_advertising) mgmt_send(data->mgmt, MGMT_OP_SET_ADVERTISING, data->mgmt_index, sizeof(param), param, NULL, NULL, NULL); -- 2.47.3