mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 336110 Missing out-of-memory check at directory/xpcom/base/src/nsLDAPConnection.cpp:1002. r/sr=dmose
This commit is contained in:
parent
2353c994b0
commit
ab27413ce3
@ -1005,9 +1005,8 @@ nsLDAPConnection::OnLookupComplete(nsICancelable *aRequest,
|
||||
// all locking etc. in nsLDAPConnection::Release().
|
||||
//
|
||||
mRunnable = new nsLDAPConnectionLoop();
|
||||
NS_ADDREF(mRunnable);
|
||||
rv = mRunnable->Init();
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_IF_ADDREF(mRunnable);
|
||||
if (!mRunnable || NS_FAILED(mRunnable->Init())) {
|
||||
rv = NS_ERROR_OUT_OF_MEMORY;
|
||||
} else {
|
||||
// Here we keep a weak reference in the runnable object to the
|
||||
|
Loading…
Reference in New Issue
Block a user