diff options
Diffstat (limited to 'generic/tclEnv.c')
-rw-r--r-- | generic/tclEnv.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/generic/tclEnv.c b/generic/tclEnv.c index 6e3b106..75f5eab 100644 --- a/generic/tclEnv.c +++ b/generic/tclEnv.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEnv.c,v 1.16 2002/08/05 03:24:40 dgp Exp $ + * RCS: @(#) $Id: tclEnv.c,v 1.17 2002/08/28 22:48:10 davygrvy Exp $ */ #include "tclInt.h" @@ -275,6 +275,11 @@ TclSetEnv(name, value) if ((index != -1) && (environ[index] == p)) { ReplaceString(oldValue, p); +#ifdef HAVE_PUTENV_THAT_COPIES + } else { + /* This putenv() copies instead of taking ownership */ + ckfree(p); +#endif } Tcl_MutexUnlock(&envMutex); |