[Zope3-checkins] CVS: Zope3/src/zope/proxy/context - decorator.c:1.2
Steve Alexander
steve@cat-box.net
Thu, 8 May 2003 07:01:47 -0400
Update of /cvs-repository/Zope3/src/zope/proxy/context
In directory cvs.zope.org:/tmp/cvs-serv19405/src/zope/proxy/context
Modified Files:
decorator.c
Log Message:
Fixed potential memory leak when passing badly formed arguments into
constructor.
=== Zope3/src/zope/proxy/context/decorator.c 1.1 => 1.2 ===
--- Zope3/src/zope/proxy/context/decorator.c:1.1 Thu May 8 06:56:59 2003
+++ Zope3/src/zope/proxy/context/decorator.c Thu May 8 07:01:46 2003
@@ -161,6 +161,10 @@
int i;
if (names_dict == NULL) goto finally;
+ /* names_dict is private to this type, so there really shouldn't
+ * be anything in it already.
+ */
+ decorator->names_dict = names_dict;
for (i=0; i<size; ++i) {
temp = PySequence_Fast_GET_ITEM(fast_names, i);
if (!PyString_CheckExact(temp)) {
@@ -172,10 +176,6 @@
goto finally;
}
}
- /* names_dict is private to this type, so there really shouldn't
- * be anything in it already.
- */
- decorator->names_dict = names_dict;
}
/* otherwise, names == (), and names_dict == NULL */