# HG changeset patch # User Atul Varma # Date 1251670207 25200 # Node ID 22d46b688ace689c9fdac444d2fff2f608ab03f6 # Parent a31ff2de6017d15c1aa304a148c98865bbbdc7bc Resolved 2 TODOs. diff -r a31ff2de6017 -r 22d46b688ace src/context.cpp --- a/src/context.cpp Sun Aug 30 15:06:10 2009 -0700 +++ b/src/context.cpp Sun Aug 30 15:10:07 2009 -0700 @@ -160,7 +160,7 @@ if (JS_GetScriptObject(script)) { pyScript = (PyObject *) PYM_newJSScript(self, script); if (pyScript == NULL) { - // TODO: We should clean up here. + Py_XDECREF(top); return NULL; } } @@ -175,7 +175,8 @@ if (funObj) { pyFunc = (PyObject *) PYM_newJSObject(self, funObj, NULL); if (pyFunc == NULL) { - // TODO: We should clean up here. + Py_XDECREF(top); + Py_DECREF(pyScript); return NULL; } } else {