From 2446ebdf6983993b10b0255e9fa85b2979bb3067 Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Tue, 16 Sep 2014 11:30:19 +0300 Subject: [PATCH] tools: Fix dereference before NULL check --- 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 3f6dd2986..b8b740c6a 100644 --- a/tools/l2cap-tester.c +++ b/tools/l2cap-tester.c @@ -673,7 +673,7 @@ static void setup_powered_common(void) data->mgmt_index, pin_code_request_callback, data, NULL); - if (test->client_io_cap) + if (test && test->client_io_cap) bthost_set_io_capability(bthost, test->client_io_cap); if (test && test->client_pin) -- 2.47.3