linux/drivers/net/wireless/intel
Miri Korenblit d32136e5ba wifi: iwlwifi: avoid memory leak
[ Upstream commit 80e96206a3 ]

A caller of iwl_acpi_get_dsm_object must free the returned object.
iwl_acpi_get_dsm_integer returns immediately without freeing
it if the expected size is more than 8 bytes. Fix that.

Note that with the current code this will never happen, since the caller
of iwl_acpi_get_dsm_integer already checks that the expected size if
either 1 or 4 bytes, so it can't exceed 8 bytes.

While at it, print the DSM value instead of the return value, as this
was the intention in the first place.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241228223206.bf61eaab99f8.Ibdc5df02f885208c222456d42c889c43b7e3b2f7@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-02-17 09:40:08 +01:00
..
ipw2x00 wifi: ipw2x00: libipw_rx_any(): fix bad alignment 2024-12-14 20:00:08 +01:00
iwlegacy wifi: iwlegacy: Clear stale interrupts before resuming device 2024-11-08 16:28:23 +01:00
iwlwifi wifi: iwlwifi: avoid memory leak 2025-02-17 09:40:08 +01:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile iwlwifi: fix build error for IWLMEI 2022-03-02 22:36:49 +01:00