Skip to content

Commit

Permalink
kbuild: remove pointless strdup() on arguments passed to new_module()…
Browse files Browse the repository at this point in the history
… in modpost

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

Signed-off-by: Jan Beulich <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
  • Loading branch information
Jan Beulich authored and sravnborg committed Apr 11, 2009
1 parent fe8d0a4 commit 0fa3a88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/mod/modpost.c
Original file line number Diff line number Diff line change
Expand Up @@ -1913,7 +1913,7 @@ static void read_dump(const char *fname, unsigned int kernel)
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));
Expand Down Expand Up @@ -1997,7 +1997,7 @@ static void read_markers(const char *fname)

mod = find_module(modname);
if (!mod) {
mod = new_module(NOFAIL(strdup(modname)));
mod = new_module(modname);
mod->skip = 1;
}
if (is_vmlinux(modname)) {
Expand Down

0 comments on commit 0fa3a88

Please sign in to comment.