From 456c19cd15beb3a33e96c9d0d22b3b29acca121f Mon Sep 17 00:00:00 2001 From: welch Date: Mon, 29 Jun 1998 15:29:35 +0000 Subject: Fixed bug in testfindexecutable --- unix/tclUnixTest.c | 6 ++++-- 1 file 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; } -- cgit v0.12