summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2015-07-30 13:02:49 (GMT)
committersebres <sebres@users.sourceforge.net>2015-07-30 13:02:49 (GMT)
commit49b6c42281198a76cb470d7f5a17e816e140c35d (patch)
treed4eb6637216361c0d7ce0fae46b132629b35892b /win
parentf9980d463faea1c016549089f3ef8fe166a41529 (diff)
downloadtcl-49b6c42281198a76cb470d7f5a17e816e140c35d.zip
tcl-49b6c42281198a76cb470d7f5a17e816e140c35d.tar.gz
tcl-49b6c42281198a76cb470d7f5a17e816e140c35d.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);