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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user