YueHaibing 7645d80ca7 kernel/module: Fix memleak in module_add_modinfo_attrs()
[ Upstream commit f6d061d617124abbd55396a3bc37b9bf7d33233c ]

In module_add_modinfo_attrs() if sysfs_create_file() fails
on the first iteration of the loop (so i = 0), we forget to
free the modinfo_attrs.

Fixes: bc6f2a757d52 ("kernel/module: Fix mem leak in module_add_modinfo_attrs")
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-02-14 16:32:06 -05:00
..
2019-05-31 06:47:25 -07:00
2019-12-01 09:14:03 +01:00
2018-08-03 07:50:38 +02:00
2019-12-05 15:38:28 +01:00
2018-08-03 07:50:22 +02:00
2020-01-09 10:17:53 +01:00
2018-05-09 09:51:50 +02:00