summaryrefslogtreecommitdiffstats
path: root/mac/tclMacFile.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 /mac/tclMacFile.c
parent5e610d838ab3c6b8398b2ae540ca3d73f2025e8a (diff)
downloadtcl-961ab79192fe2d6378d8903dca25ceaa6d4a97b8.zip
tcl-961ab79192fe2d6378d8903dca25ceaa6d4a97b8.tar.gz
tcl-961ab79192fe2d6378d8903dca25ceaa6d4a97b8.tar.bz2
backporting of filesystem tests, docs
Diffstat (limited to 'mac/tclMacFile.c')
-rw-r--r--mac/tclMacFile.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mac/tclMacFile.c b/mac/tclMacFile.c
index 0311ecd..2c6526a 100644
--- a/mac/tclMacFile.c
+++ b/mac/tclMacFile.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclMacFile.c,v 1.27 2003/03/03 20:22:43 das Exp $
+ * RCS: @(#) $Id: tclMacFile.c,v 1.27.2.1 2003/10/03 17:45:37 vincentdarley Exp $
*/
/*
@@ -178,6 +178,7 @@ TclpMatchInDirectory(interp, resultPtr, pathPtr, pattern, types)
if (TclpObjLstat(fileNamePtr, &buf) != 0) {
/* File doesn't exist */
+ Tcl_DecrRefCount(fileNamePtr);
return TCL_OK;
}
@@ -202,6 +203,7 @@ TclpMatchInDirectory(interp, resultPtr, pathPtr, pattern, types)
Tcl_ListObjAppendElement(interp, resultPtr, pathPtr);
}
}
+ Tcl_DecrRefCount(fileNamePtr);
return TCL_OK;
} else {
char *fname;
@@ -258,6 +260,7 @@ TclpMatchInDirectory(interp, resultPtr, pathPtr, pattern, types)
if ((err != noErr) || !isDirectory) {
Tcl_DStringFree(&dsOrig);
+ Tcl_DecrRefCount(fileNamePtr);
return TCL_OK;
}
}
@@ -326,6 +329,7 @@ TclpMatchInDirectory(interp, resultPtr, pathPtr, pattern, types)
}
Tcl_DStringFree(&dsOrig);
+ Tcl_DecrRefCount(fileNamePtr);
return result;
}
}
@@ -1211,6 +1215,7 @@ TclpObjLink(pathPtr, toPtr, linkAction)
Tcl_IncrRefCount(link);
Tcl_DStringFree(&ds);
}
+ Tcl_DecrRefCount(transPtr);
}
return link;
}