summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclBasic.c2
-rw-r--r--generic/tclPkg.c4
-rw-r--r--tests/scan.test2
-rw-r--r--tests/utf.test2
4 files changed, 8 insertions, 2 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 10536ee..e02cfb2 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -3151,6 +3151,7 @@ Tcl_DeleteCommandFromToken(
* traces.
*/
+ cmdPtr->nsPtr->refCount++;
if (cmdPtr->tracePtr != NULL) {
CommandTrace *tracePtr;
CallCommandTraces(iPtr,cmdPtr,NULL,NULL,TCL_TRACE_DELETE);
@@ -3178,6 +3179,7 @@ Tcl_DeleteCommandFromToken(
*/
TclInvalidateNsCmdLookup(cmdPtr->nsPtr);
+ TclNsDecrRefCount(cmdPtr->nsPtr);
/*
* If the command being deleted has a compile function, increment the
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index fb721a0..cdf9a8b 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.c
@@ -503,6 +503,8 @@ PkgRequireCore(
* The version of the package sought is better than the
* currently selected version.
*/
+ ckfree(bestVersion);
+ bestVersion = NULL;
goto newbest;
}
} else {
@@ -531,6 +533,8 @@ PkgRequireCore(
* This stable version of the package sought is better
* than the currently selected stable version.
*/
+ ckfree(bestStableVersion);
+ bestStableVersion = NULL;
goto newstable;
}
} else {
diff --git a/tests/scan.test b/tests/scan.test
index b36b412..98c581b 100644
--- a/tests/scan.test
+++ b/tests/scan.test
@@ -553,7 +553,7 @@ test scan-5.18 {bigint scanning underflow} -setup {
list [scan "-207698809136909011942886895" \
%llu a] $a
} -returnCodes 1 -result {unsigned bignum scans are invalid}
-test scan-5.18 {bigint scanning invalid} -setup {
+test scan-5.19 {bigint scanning invalid} -setup {
set a {};
} -body {
list [scan "207698809136909011942886895" \
diff --git a/tests/utf.test b/tests/utf.test
index d0fa7be..95775a8 100644
--- a/tests/utf.test
+++ b/tests/utf.test
@@ -124,7 +124,7 @@ test utf-4.10 {Tcl_NumUtfChars: #u0000, calc len, overcomplete} {testnumutfchars
test utf-5.1 {Tcl_UtfFindFirst} {testfindfirst testbytestring} {
testfindfirst [testbytestring "abcbc"] 98
} {bcbc}
-test utf-5.1 {Tcl_UtfFindLast} {testfindlast testbytestring} {
+test utf-5.2 {Tcl_UtfFindLast} {testfindlast testbytestring} {
testfindlast [testbytestring "abcbc"] 98
} {bc}