summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2002-09-03 15:04:42 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2002-09-03 15:04:42 (GMT)
commit30148b77bc386434e8e9735ddcee9c13b9480c16 (patch)
treedc445e8dbdf061a49703c6fc264734fac1f91efb
parent9b7017435d34be1678e0d82e308f9521e1a50ded (diff)
downloadtcl-30148b77bc386434e8e9735ddcee9c13b9480c16.zip
tcl-30148b77bc386434e8e9735ddcee9c13b9480c16.tar.gz
tcl-30148b77bc386434e8e9735ddcee9c13b9480c16.tar.bz2
* generic/tclVar.c (Tcl_UpVar2): a Tcl_Obj was being leaked on
error return from TclGetFrame.
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclVar.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c776f28..0204e62 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-09-03 Miguel Sofer <msofer@users.sourceforge.net>
+
+ * generic/tclVar.c (Tcl_UpVar2): a Tcl_Obj was being leaked on
+ error return from TclGetFrame.
+
2002-09-03 Don Porter <dgp@users.sourceforge.net>
* changes: Updated changes for 8.4.0 release.
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 48cc6e1..26a1bc2 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.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: tclVar.c,v 1.63 2002/08/05 03:24:41 dgp Exp $
+ * RCS: @(#) $Id: tclVar.c,v 1.64 2002/09/03 15:04:42 msofer Exp $
*/
#include "tclInt.h"
@@ -3644,11 +3644,13 @@ Tcl_UpVar2(interp, frameName, part1, part2, localName, flags)
result = TclGetFrame(interp, frameName, &framePtr);
if (result == -1) {
- return TCL_ERROR;
+ result = TCL_ERROR;
+ goto done;
}
result = ObjMakeUpvar(interp, framePtr, part1Ptr, part2, 0,
localName, flags, -1);
+ done:
TclDecrRefCount(part1Ptr);
return result;
}