aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOzan Çağlayan <ozan@pardus.org.tr>2009-08-07 10:37:11 +0300
committerJon Masters <jcm@jonmasters.org>2009-10-01 01:56:20 -0400
commit0ae7e1a5b57873186d60b9d9508820b1c5d86598 (patch)
tree22cb758a4d6f7d0d1771669097d5adfcf703aa16
parent9a1c905651a38d1f2c6d4d836f81b5e06a503521 (diff)
downloadmodule-init-tools-0ae7e1a5b57873186d60b9d9508820b1c5d86598.tar.gz
modinfo: Fix segmentation fault due to the wrong parameter
modinfo segfaults when called with a module which is just deleted from the filesystem without re-running depmod. Pass filename instead of the address of it to the error() function to fix the problem. Tested-by: Ozan Çağlayan <ozan@pardus.org.tr> Signed-off-by: Ozan Çağlayan <ozan@pardus.org.tr>
-rw-r--r--modinfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/modinfo.c b/modinfo.c
index 1c1b57e..c2d733f 100644
--- a/modinfo.c
+++ b/modinfo.c
@@ -242,7 +242,7 @@ static struct elf_file *grab_module(const char *name,
module = grab_elf_file(filename);
if (!module)
error("modinfo: could not open %s: %s\n",
- *filename, strerror(errno));
+ filename, strerror(errno));
free(filename);
return module;
}