Bluetooth: Fix potential NULL-pointer access in UART driver
If we get an invalid packet type here the buf pointer will be NULL. Going to the cleanup section at the end of the function would trigger a bt_but_put() call which would cause a NULL pointer access. Directly returning from the function is the right thing to do instead. Change-Id: I0c18646e0820cf829ef8aa3f77835ba0a14375b5 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
de1477759c
commit
c96f8e484c
|
@ -161,7 +161,7 @@ void bt_uart_isr(void *unused)
|
|||
break;
|
||||
default:
|
||||
BT_ERR("Unknown H4 type %u\n", type);
|
||||
goto failed;
|
||||
return;
|
||||
}
|
||||
|
||||
if (remaining < 0) {
|
||||
|
|
Loading…
Reference in a new issue