summaryrefslogtreecommitdiffstats
path: root/commands/loadenv.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/loadenv.c')
-rw-r--r--commands/loadenv.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/commands/loadenv.c b/commands/loadenv.c
index 44e96c3b60..6469affadb 100644
--- a/commands/loadenv.c
+++ b/commands/loadenv.c
@@ -62,20 +62,16 @@ static int do_loadenv(int argc, char *argv[])
if (argc - optind < 1) {
filename = default_environment_path_get();
} else {
- char *str = normalise_path(argv[optind]);
-
/*
* /dev/defaultenv use to contain the defaultenvironment.
* we do not have this file anymore, but maintain compatibility
* to the 'loadenv -s /dev/defaultenv' command to restore the
* default environment for some time.
*/
- if (!strcmp(str, "/dev/defaultenv"))
+ if (!strcmp(argv[optind], "/dev/defaultenv"))
defaultenv = 1;
else
filename = argv[optind];
-
- free(str);
}
if (scrub) {