aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/hush.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 7afcfbda1..8ffb117de 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -2420,7 +2420,7 @@ static int set_local_var(const char *s, int flg_export)
result = -1;
} else {
cur->name = strdup(name);
- if (cur->name) {
+ if (!cur->name) {
free(cur);
result = -1;
} else {