summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2001-03-24 01:14:27 (GMT)
committerhobbs <hobbs>2001-03-24 01:14:27 (GMT)
commiteaa5a5ecaf81f65acaed14b8a1b9c31bd2b9fd92 (patch)
tree2e10342e06209fe2d01b2d0851b63d81f8d85421
parentf8feaac0e09de7912576461ebbbe8c78b8c42ead (diff)
downloadtcl-eaa5a5ecaf81f65acaed14b8a1b9c31bd2b9fd92.zip
tcl-eaa5a5ecaf81f65acaed14b8a1b9c31bd2b9fd92.tar.gz
tcl-eaa5a5ecaf81f65acaed14b8a1b9c31bd2b9fd92.tar.bz2
* generic/tclNamesp.c (Tcl_Import): Correctly freed a DString.
(lavana) [Patch #403755]
-rw-r--r--generic/tclNamesp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index e4454e6..ba35fad 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -19,7 +19,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclNamesp.c,v 1.18 2000/05/11 00:17:29 hobbs Exp $
+ * RCS: @(#) $Id: tclNamesp.c,v 1.19 2001/03/24 01:14:27 hobbs Exp $
*/
#include "tclInt.h"
@@ -1268,6 +1268,7 @@ Tcl_Import(interp, namespacePtr, pattern, allowOverwrite)
"import pattern \"", pattern,
"\" would create a loop containing command \"",
Tcl_DStringValue(&ds), "\"", (char *) NULL);
+ Tcl_DStringFree(&ds);
return TCL_ERROR;
}
}
@@ -1280,6 +1281,7 @@ Tcl_Import(interp, namespacePtr, pattern, allowOverwrite)
dataPtr->realCmdPtr = cmdPtr;
dataPtr->selfPtr = (Command *) importedCmd;
dataPtr->selfPtr->compileProc = cmdPtr->compileProc;
+ Tcl_DStringFree(&ds);
/*
* Create an ImportRef structure describing this new import