modem: cmux: Prevent NULL deref in connect_response_transmit

Prevent potential NULL dereference identified by CID 338026

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
This commit is contained in:
Bjarki Arge Andreasen 2024-02-15 06:44:29 +01:00 committed by Henrik Brix Andersen
parent 33708c6b3d
commit 96e48c91b4

View file

@ -455,6 +455,10 @@ static void modem_cmux_on_control_frame_uih(struct modem_cmux *cmux)
static void modem_cmux_connect_response_transmit(struct modem_cmux *cmux)
{
if (cmux == NULL) {
return;
}
struct modem_cmux_frame frame = {
.dlci_address = cmux->frame.dlci_address,
.cr = cmux->frame.cr,