]> git.hungrycats.org Git - linux/commit
wifi: iwlwifi: mvm: fix potential memory leak
authorJohannes Berg <johannes.berg@intel.com>
Tue, 18 Apr 2023 09:28:08 +0000 (12:28 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 11:58:55 +0000 (13:58 +0200)
commit26a4022ca2af51d930f6c4e249bd50f910ea5491
tree384a69580091b3e448a6ed97c0f935a586ba1f82
parentde428966b40c8b8abe35592ded2e9f4d366ffc38
wifi: iwlwifi: mvm: fix potential memory leak

[ Upstream commit 457d7fb03e6c3d73fbb509bd85fc4b02d1ab405e ]

If we do get multiple notifications from firmware, then
we might have allocated 'notif', but don't free it. Fix
that by checking for duplicates before allocation.

Fixes: 4da46a06d443 ("wifi: iwlwifi: mvm: Add support for wowlan info notification")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230418122405.116758321cc4.I8bdbcbb38c89ac637eaa20dda58fa9165b25893a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/intel/iwlwifi/mvm/d3.c