From 49b6c42281198a76cb470d7f5a17e816e140c35d Mon Sep 17 00:00:00 2001 From: sebres Date: Thu, 30 Jul 2015 13:02:49 +0000 Subject: Fix bug [f00009f7ce]: memory (object) leaks in TclNativeCreateNativeRep for windows platform (erroneous Tcl_IncrRefCount removed) --- win/tclWinFile.c | 10 +++------- 1 file 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); -- cgit v0.12