commit | 0b3aef23b8e5cc935caaec6230782553c1a4ca95 | [log] [tgz] |
---|---|---|
author | Colin Walters <walters@verbum.org> | Wed Feb 25 08:22:38 2015 -0500 |
committer | Lucas De Marchi <lucas.demarchi@intel.com> | Wed Feb 25 11:27:05 2015 -0300 |
tree | 5cd3904b33010ceef13baab3a913a0e6d09e6004 | |
parent | e90f0704ea81c4e90663c4e8ea91e475f0b6aa36 [diff] |
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.
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 @@ } 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",