diff options
author | sebres <sebres@users.sourceforge.net> | 2015-07-30 13:02:49 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2015-07-30 13:02:49 (GMT) |
commit | 49b6c42281198a76cb470d7f5a17e816e140c35d (patch) | |
tree | d4eb6637216361c0d7ce0fae46b132629b35892b /win/tclWinFile.c | |
parent | f9980d463faea1c016549089f3ef8fe166a41529 (diff) | |
download | tcl-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/tclWinFile.c')
-rwxr-xr-x | win/tclWinFile.c | 10 |
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); |