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 | a6c191c2eaf0913d127c222ce898b9d4ae052550 (patch) | |
tree | d4eb6637216361c0d7ce0fae46b132629b35892b /win | |
parent | 7dfee7792b7d2a651757c3535840384f5860eec9 (diff) | |
download | tcl-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')
-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); |