summaryrefslogtreecommitdiff
path: root/src/basic/env-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/env-util.c')
-rw-r--r--src/basic/env-util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/basic/env-util.c b/src/basic/env-util.c
index 7c69ccdaf9..96da38d45e 100644
--- a/src/basic/env-util.c
+++ b/src/basic/env-util.c
@@ -395,7 +395,8 @@ int strv_env_replace(char ***l, char *p) {
for (f = *l; f && *f; f++)
if (env_match(*f, p)) {
- free_and_replace(*f, p);
+ free(*f);
+ *f = p;
strv_env_unset(f + 1, p);
return 0;
}