diff options
Diffstat (limited to 'src/shared/serialize.c')
-rw-r--r-- | src/shared/serialize.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/shared/serialize.c b/src/shared/serialize.c index 42fe5db3fa..23aac3ef52 100644 --- a/src/shared/serialize.c +++ b/src/shared/serialize.c @@ -175,7 +175,7 @@ int deserialize_dual_timestamp(const char *value, dual_timestamp *t) { } int deserialize_environment(const char *value, char ***list) { - char *unescaped; + _cleanup_free_ char *unescaped = NULL; int r; assert(value); @@ -187,9 +187,10 @@ int deserialize_environment(const char *value, char ***list) { if (r < 0) return log_error_errno(r, "Failed to unescape: %m"); - r = strv_env_replace_consume(list, unescaped); + r = strv_env_replace_consume(list, TAKE_PTR(unescaped)); if (r < 0) return log_error_errno(r, "Failed to append environment variable: %m"); + return 0; } |