From 2044eda3d3d8e228ffb20840f511f8de39238b1f Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 29 Nov 2006 15:01:25 +0000 Subject: * generic/tclBasic.c (Tcl_AppendObjToErrorInfo): Added Tcl_DecrRefCount() on the objPtr argument to plug memory leaks. This makes the routine a consumer, which makes it easiest to use. --- ChangeLog | 6 ++++++ generic/tclBasic.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index fefc447..1532983 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-11-29 Don Porter + + * generic/tclBasic.c (Tcl_AppendObjToErrorInfo): Added + Tcl_DecrRefCount() on the objPtr argument to plug memory leaks. + This makes the routine a consumer, which makes it easiest to use. + 2006-11-28 Andreas Kupries * generic/tclBasic.c: TIP #280 implementation. diff --git a/generic/tclBasic.c b/generic/tclBasic.c index ef01194..5df0a81 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.221 2006/11/28 22:20:27 andreas_kupries Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.222 2006/11/29 15:01:26 dgp Exp $ */ #include "tclInt.h" @@ -5188,6 +5188,7 @@ Tcl_AppendObjToErrorInfo( CONST char *message = Tcl_GetStringFromObj(objPtr, &length); Tcl_AddObjErrorInfo(interp, message, length); + Tcl_DecrRefCount(objPtr); } /* -- cgit v0.12