Commit 58e98fb7 authored by YueHaibing's avatar YueHaibing Committed by Kleber Sacilotto de Souza

tty: ipwireless: Fix potential NULL pointer dereference

BugLink: https://bugs.launchpad.net/bugs/1864773

[ Upstream commit 7dd50e20 ]

There is a potential NULL pointer dereference in case
alloc_ctrl_packet() fails and returns NULL.

Fixes: 099dc4fb ("ipwireless: driver for PC Card 3G/UMTS modem")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 6c3c29f6
......@@ -1515,6 +1515,8 @@ static void ipw_send_setup_packet(struct ipw_hardware *hw)
sizeof(struct ipw_setup_get_version_query_packet),
ADDR_SETUP_PROT, TL_PROTOCOLID_SETUP,
TL_SETUP_SIGNO_GET_VERSION_QRY);
if (!ver_packet)
return;
ver_packet->header.length = sizeof(struct tl_setup_get_version_qry);
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment