summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixTest.c
diff options
context:
space:
mode:
authorwelch <welch@noemail.net>1998-06-29 15:29:34 (GMT)
committerwelch <welch@noemail.net>1998-06-29 15:29:34 (GMT)
commiteb8696505c35fa6926af7416c1ffa9d005c9d169 (patch)
tree89653aaef43a2cd84cd3a2ad7ee7b60f391c0d78 /unix/tclUnixTest.c
parent6b9751330c9453fa8ac5651fca2c9abec54e648e (diff)
downloadtcl-eb8696505c35fa6926af7416c1ffa9d005c9d169.zip
tcl-eb8696505c35fa6926af7416c1ffa9d005c9d169.tar.gz
tcl-eb8696505c35fa6926af7416c1ffa9d005c9d169.tar.bz2
Fixed bug in testfindexecutable
FossilOrigin-Name: 02c5be7655ab86a5a9d22fe7b9c776565e506f91
Diffstat (limited to 'unix/tclUnixTest.c')
-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;
}