summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2015-02-25 08:22:38 -0500
committerLucas De Marchi <lucas.demarchi@intel.com>2015-02-25 11:27:05 -0300
commit0b3aef23b8e5cc935caaec6230782553c1a4ca95 (patch)
tree5cd3904b33010ceef13baab3a913a0e6d09e6004
parente90f0704ea81c4e90663c4e8ea91e475f0b6aa36 (diff)
downloadkmod-0b3aef23b8e5cc935caaec6230782553c1a4ca95.tar.gz
depmod: Fix crash in previous commit if root is not set
[This fixes http://build.gnome.org/continuous/buildmaster/builds/2015/02/25/31/build/output.txt ] The variable we're reading here is "root", not "optarg" which is only valid inside the getopt call.
-rw-r--r--tools/depmod.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/depmod.c b/tools/depmod.c
index a4a7479..18aab5d 100644
--- a/tools/depmod.c
+++ b/tools/depmod.c
@@ -2484,7 +2484,7 @@ static int do_depmod(int argc, char *argv[])
}
if (root)
- root = path_make_absolute_cwd(optarg);
+ root = path_make_absolute_cwd(root);
cfg.dirnamelen = snprintf(cfg.dirname, PATH_MAX,
"%s/lib/modules/%s",