summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2006-11-29 15:01:25 (GMT)
committerdgp <dgp@users.sourceforge.net>2006-11-29 15:01:25 (GMT)
commit2044eda3d3d8e228ffb20840f511f8de39238b1f (patch)
tree74e4d180324cb623cd37caa94bb4db75ec38f21b /generic/tclBasic.c
parentacf60973500b17458f07ae9f83c1fe5ebd93140f (diff)
downloadtcl-2044eda3d3d8e228ffb20840f511f8de39238b1f.zip
tcl-2044eda3d3d8e228ffb20840f511f8de39238b1f.tar.gz
tcl-2044eda3d3d8e228ffb20840f511f8de39238b1f.tar.bz2
* 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.
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c3
1 files changed, 2 insertions, 1 deletions
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);
}
/*