Re: [PATCH] kernel/module: Fix memleak in module_add_modinfo_attrs()
From: Miroslav Benes
Date: Wed Jan 08 2020 - 03:05:40 EST
On Sat, 28 Dec 2019, YueHaibing wrote:
> 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")
> Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>
Reviewed-by: Miroslav Benes <mbenes@xxxxxxx>
M