summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2010-04-06 07:50:45 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2010-04-06 07:50:45 (GMT)
commit69c7693180940219e1d636ee951cc98cf1ad9686 (patch)
tree8be9d98e3b9e7eb58c96c3f47a59b450b9a99dba
parent068f40511f242f8ead57c0dca5f00b0eba4b6309 (diff)
downloadtcl-69c7693180940219e1d636ee951cc98cf1ad9686.zip
tcl-69c7693180940219e1d636ee951cc98cf1ad9686.tar.gz
tcl-69c7693180940219e1d636ee951cc98cf1ad9686.tar.bz2
* generic/tclCmdMZ.c (Tcl_RegexpObjCmd): Plug leak of object when
setting a variable fails.
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclCmdMZ.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 952da2a..572a3d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-04-06 Donal K. Fellows <dkf@users.sf.net>
+
+ * generic/tclCmdMZ.c (Tcl_RegexpObjCmd): Plug leak of object when
+ setting a variable fails.
+
2010-04-05 Alexandre Ferrieux <ferrieux@users.sourceforge.net>
TIP #348 IMPLEMENTATION - Substituted error stack
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 618bb6b..e4298fc 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -15,7 +15,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.210 2010/03/27 22:40:13 nijtmans Exp $
+ * RCS: @(#) $Id: tclCmdMZ.c,v 1.211 2010/04/06 07:50:45 dkf Exp $
*/
#include "tclInt.h"
@@ -391,6 +391,7 @@ Tcl_RegexpObjCmd(
if (valuePtr == NULL) {
Tcl_AppendResult(interp, "couldn't set variable \"",
TclGetString(objv[i]), "\"", NULL);
+ Tcl_DecrRefCount(newPtr);
return TCL_ERROR;
}
}