diff options
author | hobbs <hobbs@noemail.net> | 2003-05-14 17:17:43 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2003-05-14 17:17:43 (GMT) |
commit | 7e759516db22e797e61442a1f25aed90ca049779 (patch) | |
tree | d8a08a2bd5ff56c68dc07a8b4cc69233b1de4a56 | |
parent | e6ef8e9184f21c7b5959b2f439e9acc44ba0b7f0 (diff) | |
download | tcl-7e759516db22e797e61442a1f25aed90ca049779.zip tcl-7e759516db22e797e61442a1f25aed90ca049779.tar.gz tcl-7e759516db22e797e61442a1f25aed90ca049779.tar.bz2 |
* generic/tclEnv.c (TclUnsetEnv): Another putenv() copy behavior
problem repaired when compiling on windows and using microsoft's
runtime. [Bug 736421] (gravereaux)
FossilOrigin-Name: 5c3bd6b6b76e23ab10a703f73b91d42215fa0f66
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tclEnv.c | 7 |
2 files changed, 12 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2003-05-14 Jeff Hobbs <jeffh@ActiveState.com> + + * generic/tclEnv.c (TclUnsetEnv): Another putenv() copy behavior + problem repaired when compiling on windows and using microsoft's + runtime. [Bug 736421] (gravereaux) + 2003-05-13 Jeff Hobbs <jeffh@ActiveState.com> * generic/tclIOUtil.c: add decl for FsThrExitProc to suppress 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++) { |