]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
qtnfmac: fix resource leaks on unsupported iftype error return path
authorColin Ian King <colin.king@canonical.com>
Fri, 25 Sep 2020 13:22:24 +0000 (14:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:07:46 +0000 (10:07 +0100)
commita30a515f27733a338452437a32384725826b0a37
treea3c83b7824977df1555c60eca0f0eb14b792b01d
parent148a2543ca50b3ad01ae9d9313161bd8fc64c24c
qtnfmac: fix resource leaks on unsupported iftype error return path

[ Upstream commit 63f6982075d890d7563e2469643f05a37d193f01 ]

Currently if an unsupported iftype is detected the error return path
does not free the cmd_skb leading to a resource leak. Fix this by
free'ing cmd_skb.

Addresses-Coverity: ("Resource leak")
Fixes: 805b28c05c8e ("qtnfmac: prepare for AP_VLAN interface type support")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200925132224.21638-1-colin.king@canonical.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/quantenna/qtnfmac/commands.c