aboutsummaryrefslogtreecommitdiffstats
path: root/libexec_unsetenv.c
diff options
context:
space:
mode:
Diffstat (limited to 'libexec_unsetenv.c')
-rw-r--r--libexec_unsetenv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libexec_unsetenv.c b/libexec_unsetenv.c
index 48ec645..f6a71e2 100644
--- a/libexec_unsetenv.c
+++ b/libexec_unsetenv.c
@@ -31,7 +31,7 @@ libexec_unsetenv(struct libexec_command *cmd, const char *name)
return -1;
env = cmd->environ;
}
- free(env);
+ free(env[i]);
memmove(&env[i], &env[i + 1], (n - i - 1) * sizeof(*env));
n--;
} else {