iwlwifi: pcie: fix context info memory leak
authorJohannes Berg <johannes.berg@intel.com>
Fri, 15 Jan 2021 11:05:56 +0000 (13:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 13 Feb 2021 12:55:09 +0000 (13:55 +0100)
commit05132a72cc1d1be8f4b20ba769bad9210d5df513
tree9741a0ae8cbe6b61b56949b8c8fb617d01edd723
parentfbdf0bf97cb0e8d221ea5fc79f547b634a09e148
iwlwifi: pcie: fix context info memory leak

[ Upstream commit 2d6bc752cc2806366d9a4fd577b3f6c1f7a7e04e ]

If the image loader allocation fails, we leak all the previously
allocated memory. Fix this.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/iwlwifi.20210115130252.97172cbaa67c.I3473233d0ad01a71aa9400832fb2b9f494d88a11@changeid
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c