diff options
author | hobbs <hobbs> | 2003-05-14 17:17:44 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2003-05-14 17:17:44 (GMT) |
commit | f831aac82cc3bc15bce1d99f80b24044a7f8a043 (patch) | |
tree | d8a08a2bd5ff56c68dc07a8b4cc69233b1de4a56 /generic/tclEnv.c | |
parent | 2cc57665b1174e8d561cc1404f71d75601dedd04 (diff) | |
download | tcl-f831aac82cc3bc15bce1d99f80b24044a7f8a043.zip tcl-f831aac82cc3bc15bce1d99f80b24044a7f8a043.tar.gz tcl-f831aac82cc3bc15bce1d99f80b24044a7f8a043.tar.bz2 |
* generic/tclEnv.c (TclUnsetEnv): Another putenv() copy behavior
problem repaired when compiling on windows and using microsoft's
runtime. [Bug 736421] (gravereaux)
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..1e171ff 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.20.2.1 2003/05/14 17:17:46 hobbs 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++) { |