aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/module.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 07c80e68a6c4..eccb561dd8a3 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2355,7 +2355,8 @@ static noinline struct module *load_module(void __user *umod,
2355 if (err < 0) 2355 if (err < 0)
2356 goto unlink; 2356 goto unlink;
2357 add_sect_attrs(mod, hdr->e_shnum, secstrings, sechdrs); 2357 add_sect_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
2358 add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs); 2358 if (mod->sect_attrs)
2359 add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
2359 2360
2360 /* Get rid of temporary copy */ 2361 /* Get rid of temporary copy */
2361 vfree(hdr); 2362 vfree(hdr);