summaryrefslogtreecommitdiffstats
path: root/win/tclWinFile.c
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2003-10-03 17:45:36 (GMT)
committervincentdarley <vincentdarley>2003-10-03 17:45:36 (GMT)
commit961ab79192fe2d6378d8903dca25ceaa6d4a97b8 (patch)
tree60e58def2b9c6ca8559eb36ce4d18dcb276d6fe3 /win/tclWinFile.c
parent5e610d838ab3c6b8398b2ae540ca3d73f2025e8a (diff)
downloadtcl-961ab79192fe2d6378d8903dca25ceaa6d4a97b8.zip
tcl-961ab79192fe2d6378d8903dca25ceaa6d4a97b8.tar.gz
tcl-961ab79192fe2d6378d8903dca25ceaa6d4a97b8.tar.bz2
backporting of filesystem tests, docs
Diffstat (limited to 'win/tclWinFile.c')
-rw-r--r--win/tclWinFile.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index f1f1ffa..13a2c48 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinFile.c,v 1.44.2.5 2003/07/17 00:16:04 hobbs Exp $
+ * RCS: @(#) $Id: tclWinFile.c,v 1.44.2.6 2003/10/03 17:45:37 vincentdarley Exp $
*/
//#define _WIN32_WINNT 0x0500
@@ -818,7 +818,8 @@ TclpMatchInDirectory(interp, resultPtr, pathPtr, pattern, types)
}
}
dirName = Tcl_DStringValue(&dirString);
-
+ Tcl_DecrRefCount(fileNamePtr);
+
/*
* First verify that the specified path is actually a directory.
*/
@@ -1556,9 +1557,13 @@ TclpObjStat(pathPtr, statPtr)
transPtr = Tcl_FSGetTranslatedPath(NULL, pathPtr);
if (transPtr == NULL || (strpbrk(Tcl_GetString(transPtr), "?*") != NULL)) {
+ if (transPtr != NULL) {
+ Tcl_DecrRefCount(transPtr);
+ }
Tcl_SetErrno(ENOENT);
return -1;
}
+ Tcl_DecrRefCount(transPtr);
#endif
/*