summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsebres@users.sourceforge.net <sebres>2015-07-30 13:02:49 (GMT)
committersebres@users.sourceforge.net <sebres>2015-07-30 13:02:49 (GMT)
commit8c00651852c62c75770396bcf3b92fbefe0426a6 (patch)
treed4eb6637216361c0d7ce0fae46b132629b35892b /win
parent378dde68c08b0295b0a34ac0ad0bea1259ee7e81 (diff)
downloadtcl-8c00651852c62c75770396bcf3b92fbefe0426a6.zip
tcl-8c00651852c62c75770396bcf3b92fbefe0426a6.tar.gz
tcl-8c00651852c62c75770396bcf3b92fbefe0426a6.tar.bz2
Fix bug [f00009f7ce]: memory (object) leaks in TclNativeCreateNativeRep for windows platform (erroneous Tcl_IncrRefCount removed)
Diffstat (limited to 'win')
-rwxr-xr-xwin/tclWinFile.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index a5b14b4..5ee73d5 100755
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -2911,19 +2911,15 @@ TclNativeCreateNativeRep(
*/
validPathPtr = Tcl_FSGetTranslatedPath(NULL, pathPtr);
- if (validPathPtr == NULL) {
- return NULL;
- }
} else {
/*
* Make sure the normalized path is set.
*/
validPathPtr = Tcl_FSGetNormalizedPath(NULL, pathPtr);
- if (validPathPtr == NULL) {
- return NULL;
- }
- Tcl_IncrRefCount(validPathPtr);
+ }
+ if (validPathPtr == NULL) {
+ return NULL;
}
str = Tcl_GetString(validPathPtr);