diff options
-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; } } |