Skip to content
Commit f6d061d6 authored by YueHaibing's avatar YueHaibing Committed by Jessica Yu
Browse files

kernel/module: Fix memleak in module_add_modinfo_attrs()

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: bc6f2a75

 ("kernel/module: Fix mem leak in module_add_modinfo_attrs")
Reviewed-by: default avatarMiroslav Benes <mbenes@suse.cz>
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarJessica Yu <jeyu@kernel.org>
parent ce2b617c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment