Skip to contentSkip to conversation

remove pointless strdup() on arguments passed to new_module()

PATCH Applied Jan Beulich 2 participants 2 messages Mar 12, 2009 – Apr 10, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove pointless strdup() on arguments passed to new_module()

new_module() itself already calls strdup() on its modname parameter.

---
 scripts/mod/modpost.c |   4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/mod/modpost.c +2 -2
@@ -1910,7 +1910,7 @@ static void read_dump(const char *fname,
 		if (!mod) {
 			if (is_vmlinux(modname))
 				have_vmlinux = 1;
-			mod = new_module(NOFAIL(strdup(modname)));
+			mod = new_module(modname);
 			mod->skip = 1;
 		}
 		s = sym_add_exported(symname, mod, export_no(export));
@@ -1994,7 +1994,7 @@ static void read_markers(const char *fna
 
 		mod = find_module(modname);
 		if (!mod) {
-			mod = new_module(NOFAIL(strdup(modname)));
+			mod = new_module(modname);
 			mod->skip = 1;
 		}
 		if (is_vmlinux(modname)) {