From 8a5b3e7ff48a64b821dda90a50472a6abb65138f Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 8 Jan 2014 17:24:22 +0200 Subject: [PATCH] tools/mgmt-tester: Fix potential NULL pointer dereference --- tools/mgmt-tester.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index c518e47d7..34c8e1beb 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -2646,7 +2646,7 @@ static void test_setup(const void *test_data) const struct generic_data *test = data->test_data; const uint16_t *cmd; - if (test->pin) { + if (test && test->pin) { struct bthost *bthost = hciemu_client_get_host(data->hciemu); bthost_set_pin_code(bthost, test->pin, test->pin_len); -- 2.47.3