From 33f261a4ce1d67ef4394ca63b4347fd00185e0ca Mon Sep 17 00:00:00 2001 From: "mhammond%skippinet.com.au" Date: Thu, 12 Jul 2007 06:39:22 +0000 Subject: [PATCH] Fix a memory leak when Python calls nsIClassInfo::GetInterfaces() Not part of the default build. --- extensions/python/xpcom/src/PyIClassInfo.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/extensions/python/xpcom/src/PyIClassInfo.cpp b/extensions/python/xpcom/src/PyIClassInfo.cpp index bf7b5285fa4..2e2c8f8b1e7 100644 --- a/extensions/python/xpcom/src/PyIClassInfo.cpp +++ b/extensions/python/xpcom/src/PyIClassInfo.cpp @@ -70,6 +70,7 @@ static PyObject *PyGetInterfaces(PyObject *self, PyObject *args) nsIID** iidArray = nsnull; PRUint32 iidCount = 0; nsresult r; + PRUint32 i; Py_BEGIN_ALLOW_THREADS; r = pI->GetInterfaces(&iidCount, &iidArray); Py_END_ALLOW_THREADS; @@ -78,9 +79,11 @@ static PyObject *PyGetInterfaces(PyObject *self, PyObject *args) PyObject *ret = PyTuple_New(iidCount); if (ret==NULL) - return NULL; - for (PRUint32 i=0;i