summaryrefslogtreecommitdiffstats
path: root/win/tclWinFile.c
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)
commita6c191c2eaf0913d127c222ce898b9d4ae052550 (patch)
treed4eb6637216361c0d7ce0fae46b132629b35892b /win/tclWinFile.c
parent7dfee7792b7d2a651757c3535840384f5860eec9 (diff)
downloadtcl-a6c191c2eaf0913d127c222ce898b9d4ae052550.zip
tcl-a6c191c2eaf0913d127c222ce898b9d4ae052550.tar.gz
tcl-a6c191c2eaf0913d127c222ce898b9d4ae052550.tar.bz2
Fix bug [f00009f7ce]: memory (object) leaks in TclNativeCreateNativeRep for windows platform (erroneous Tcl_IncrRefCount removed)
Diffstat (limited to 'win/tclWinFile.c')
-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);