diff options
| author | Ben Hutchings <ben.hutchings@codethink.co.uk> | 2017-11-10 18:48:50 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-16 10:33:54 +0100 |
| commit | 32f8870cc9a92467c411b492c6bf4781c41f0afa (patch) | |
| tree | e176efe95812e28dd3d58b4f44c1160698fcaecb /lib/genalloc.c | |
| parent | 0aab426757d3fc8e573856721d32a3c676c8138a (diff) | |
mac80211_hwsim: Fix memory leak in hwsim_new_radio_nl()
[ Upstream commit 67bd52386125ce1159c0581cbcd2740addf33cd4 ]
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: ff4dd73dd2b4 ("mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length")
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/genalloc.c')
0 files changed, 0 insertions, 0 deletions
