summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorwelch <welch>1998-06-29 15:29:35 (GMT)
committerwelch <welch>1998-06-29 15:29:35 (GMT)
commit456c19cd15beb3a33e96c9d0d22b3b29acca121f (patch)
tree89653aaef43a2cd84cd3a2ad7ee7b60f391c0d78 /unix
parent61317caad1a51589029679818be0470c99d704b7 (diff)
downloadtcl-456c19cd15beb3a33e96c9d0d22b3b29acca121f.zip
tcl-456c19cd15beb3a33e96c9d0d22b3b29acca121f.tar.gz
tcl-456c19cd15beb3a33e96c9d0d22b3b29acca121f.tar.bz2
Fixed bug in testfindexecutable
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixTest.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c
index e6812a7..cbc2639 100644
--- a/unix/tclUnixTest.c
+++ b/unix/tclUnixTest.c
@@ -423,8 +423,10 @@ TestfindexecutableCmd(clientData, interp, argc, argv)
oldName = tclExecutableName;
tclExecutableName = NULL;
Tcl_FindExecutable(argv[1]);
- Tcl_SetResult(interp, tclExecutableName, TCL_DYNAMIC);
- ckfree(tclExecutableName);
+ if (tclExecutableName != NULL) {
+ Tcl_SetResult(interp, tclExecutableName, TCL_VOLATILE);
+ ckfree(tclExecutableName);
+ }
tclExecutableName = oldName;
return TCL_OK;
}