From 641b77b740adc95f4c7d5bb7c642c0e78ae91847 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 27 May 2024 11:14:20 +0300 Subject: [PATCH] Bluetooth: samples: hci_ipc: Fix incorrect NULL pointer check The condition was the inverse of what it should have been, leading to an inevitable NULL pointer dereference later. Signed-off-by: Johan Hedberg --- samples/bluetooth/hci_ipc/src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/bluetooth/hci_ipc/src/main.c b/samples/bluetooth/hci_ipc/src/main.c index 5f0614139be..814001646e4 100644 --- a/samples/bluetooth/hci_ipc/src/main.c +++ b/samples/bluetooth/hci_ipc/src/main.c @@ -294,7 +294,7 @@ void bt_ctlr_assert_handle(char *file, uint32_t line) struct net_buf *buf; buf = hci_vs_err_assert(file, line); - if (buf == NULL) { + if (buf != NULL) { /* Send the event over ipc */ hci_ipc_send(buf, HCI_FATAL_ERR_MSG); } else {