ieee802154: hwsim: Fix possible memory leaks
authorChen Aotian <chenaotian2@163.com>
Sun, 9 Apr 2023 02:20:48 +0000 (10:20 +0800)
committerStefan Schmidt <stefan@datenfreihafen.org>
Wed, 12 Apr 2023 19:31:32 +0000 (21:31 +0200)
commita61675294735570daca3779bd1dbb3715f7232bd
tree0035a582597800801ab467cedfa45cddb98012d2
parent209373537648d815a104c3af787663d7db06bd5d
ieee802154: hwsim: Fix possible memory leaks

After replacing e->info, it is necessary to free the old einfo.

Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb")
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: Chen Aotian <chenaotian2@163.com>
Link: https://lore.kernel.org/r/20230409022048.61223-1-chenaotian2@163.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
drivers/net/ieee802154/mac802154_hwsim.c