diff mbox series

[2/2] modprobe: re-use modname variable

Message ID 20220603204902.4295-2-lucas.de.marchi@gmail.com (mailing list archive)
State New
Headers show
Series [1/2] depmod: Fix writing over array length | expand

Commit Message

Lucas De Marchi June 3, 2022, 8:49 p.m. UTC
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
---
 tools/modprobe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tools/modprobe.c b/tools/modprobe.c
index 830c667..a825fb5 100644
--- a/tools/modprobe.c
+++ b/tools/modprobe.c
@@ -324,7 +324,7 @@  static int rmmod_do_remove_module(struct kmod_module *mod)
 	const char *modname = kmod_module_get_name(mod);
 	int flags = 0, err;
 
-	SHOW("rmmod %s\n", kmod_module_get_name(mod));
+	SHOW("rmmod %s\n", modname);
 
 	if (dry_run)
 		return 0;