diff options
author | vasiljevic <zv@archiware.com> | 2010-04-06 07:45:55 (GMT) |
---|---|---|
committer | vasiljevic <zv@archiware.com> | 2010-04-06 07:45:55 (GMT) |
commit | a8d78114d69c42639beecfc8d0bfed9bddb55c08 (patch) | |
tree | 85954ef69c3d279b361c5b43b647bed07e75ad32 | |
parent | 7c7d90d57d57939779bcba9540d93fb9e359d419 (diff) | |
download | tcl-a8d78114d69c42639beecfc8d0bfed9bddb55c08.zip tcl-a8d78114d69c42639beecfc8d0bfed9bddb55c08.tar.gz tcl-a8d78114d69c42639beecfc8d0bfed9bddb55c08.tar.bz2 |
Fixed object leak
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | generic/tclCmdMZ.c | 5 |
2 files changed, 6 insertions, 3 deletions
@@ -1,3 +1,7 @@ +2010-04-06 Zoran Vasiljevic <vasiljevic@users.sourceforge.net> + + * generic/tclCmdMZ.c (Tcl_RegexpObjCmd): fixed object leak. + 2010-04-02 Zoran Vasiljevic <vasiljevic@users.sourceforge.net> * generic/tclStringObj.c: (SetStringFromAny): avoid trampling diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index a082820..753f0c1 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.82.2.31 2009/09/18 21:13:41 dgp Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.82.2.32 2010/04/06 07:45:56 vasiljevic Exp $ */ #include "tclInt.h" @@ -471,12 +471,11 @@ Tcl_RegexpObjCmd(dummy, interp, objc, objv) } } else { Tcl_Obj *valuePtr; - Tcl_IncrRefCount(newPtr); valuePtr = Tcl_ObjSetVar2(interp, objv[i], NULL, newPtr, 0); - Tcl_DecrRefCount(newPtr); if (valuePtr == NULL) { Tcl_AppendResult(interp, "couldn't set variable \"", Tcl_GetString(objv[i]), "\"", (char *) NULL); + Tcl_DecrRefCount(newPtr); return TCL_ERROR; } } |