From 1268a25362d8b84daac84c8010a50da1711094e2 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 27 Oct 2009 20:30:46 +0000 Subject: * generic/tclPathObj.c: Missing refcount on cached normalized path caused crashes. [Bug 2884203]. --- ChangeLog | 5 +++++ generic/tclPathObj.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 816a665..1b46d53 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-10-27 Don Porter + + * generic/tclPathObj.c: Missing refcount on cached normalized path + caused crashes. [Bug 2884203]. + 2009-10-27 Kevin B. Kenny * library/clock.tcl (ParseClockScanFormat): diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 60220b9..bd69f09 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.66.2.9 2009/08/20 14:59:53 dgp Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.66.2.10 2009/10/27 20:30:48 dgp Exp $ */ #include "tclInt.h" @@ -2005,6 +2005,7 @@ Tcl_FSGetNormalizedPath( TclFSNormalizeToUniquePath(interp, copy, cwdLen-1, (fsPathPtr->nativePathPtr == NULL ? &clientData : NULL)); fsPathPtr->normPathPtr = copy; + Tcl_IncrRefCount(fsPathPtr->normPathPtr); if (clientData != NULL) { fsPathPtr->nativePathPtr = clientData; } -- cgit v0.12