Bug 354307 - newInterface not freed if nsProxyObject::LockedFind fails, r=timeless

git-svn-id: svn://10.0.0.236/trunk@218532 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
benjamin%smedbergs.us
2007-01-17 20:18:44 +00:00
parent d0bcd8ba71
commit fb293bb854

View File

@@ -431,8 +431,11 @@ nsProxyObject::LockedFind(REFNSIID aIID, void **aResult)
peo = new nsProxyEventObject(this, pec,
already_AddRefed<nsISomeInterface>(newInterface), &rv);
if (!peo)
if (!peo) {
NS_RELEASE(newInterface);
return NS_ERROR_OUT_OF_MEMORY;
}
if (NS_FAILED(rv)) {
delete peo;
return rv;