Commit 816e4c54 authored by Ben Hutchings's avatar Ben Hutchings Committed by Alistair Strachan
Browse files

UPSTREAM: mac80211_hwsim: Fix memory leak in hwsim_new_radio_nl()



[ Upstream commit 67bd5238 ]

hwsim_new_radio_nl() now copies the name attribute in order to add a
null-terminator.  mac80211_hwsim_new_radio() (indirectly) copies it
again into the net_device structure, so the first copy is not used or
freed later.  Free the first copy before returning.

Fixes: ff4dd73d ("mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length")
Signed-off-by: default avatarBen Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 32f8870c)
Bug: 70214720
Change-Id: Ieebed8c18bce0569fff9849bd8265da9ddb6d4dc
Signed-off-by: default avatarAlistair Strachan <astrachan@google.com>
parent 6380c410
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment