X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/db3f7b6972f3b003c0413b78afcfbe295ffe0b97..a85c067ba6c6940512cf57ec213277a370d87e70:/src/src/setenv.c diff --git a/src/src/setenv.c b/src/src/setenv.c index 9a05b64b9..877fe388f 100644 --- a/src/src/setenv.c +++ b/src/src/setenv.c @@ -6,6 +6,7 @@ * Copyright (c) Jeremy Harris 2015 - 2016 * Copyright (c) The Exim Maintainers 2016 */ /* See the file NOTICE for conditions of use and distribution. */ +/* SPDX-License-Identifier: GPL-2.0-only */ /* This module provides (un)setenv routines for those environments lacking them in libraries. It is #include'd by OS/os.c-foo files. */ @@ -17,7 +18,7 @@ setenv(const char * name, const char * val, int overwrite) uschar * s; if (Ustrchr(name, '=')) return -1; if (overwrite || !getenv(name)) - putenv(CS string_copy_malloc(string_sprintf("%s=%s", name, val))); + putenv(CS string_copy_perm(string_sprintf("%s=%s", name, val), FALSE)); return 0; }