diff options
author | davygrvy <davygrvy@noemail.net> | 2003-05-14 06:17:48 (GMT) |
---|---|---|
committer | davygrvy <davygrvy@noemail.net> | 2003-05-14 06:17:48 (GMT) |
commit | 9055ccc1afbe222202b126a7b02e1aa15938d89d (patch) | |
tree | 757d80bb9bc2fc4cee430cc955ca89b8a3a40a16 /generic/tclEnv.c | |
parent | 037f65711f910fb53ced8c02fff565ff601ccada (diff) | |
download | tcl-9055ccc1afbe222202b126a7b02e1aa15938d89d.zip tcl-9055ccc1afbe222202b126a7b02e1aa15938d89d.tar.gz tcl-9055ccc1afbe222202b126a7b02e1aa15938d89d.tar.bz2 |
Another putenv() copy behavior problem repaired when compiling on windows
and using microsoft's runtime. [Bug 736421]
FossilOrigin-Name: d18547259be92e276abfcc5b74bbbf66401979a2
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 1d6e66f..f814164 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.20 2003/01/14 02:06:11 mdejong Exp $ + * RCS: @(#) $Id: tclEnv.c,v 1.21 2003/05/14 06:17:49 davygrvy Exp $ */ #include "tclInt.h" @@ -429,6 +429,11 @@ TclUnsetEnv(name) if (environ[index] == string) { ReplaceString(oldValue, string); +#ifdef HAVE_PUTENV_THAT_COPIES + } else { + /* This putenv() copies instead of taking ownership */ + ckfree(string); +#endif } #else for (envPtr = environ+index+1; ; envPtr++) { |