зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1509562 Part 2 - Avoid UAF when resetting middleman calls, r=lsmyth.
--HG-- extra : rebase_source : 9b293c766746741b5835b924b89f246ce557f4c4
This commit is contained in:
Родитель
fb3b6b5517
Коммит
0c9d0e2f87
|
@ -224,16 +224,21 @@ ResetMiddlemanCalls()
|
|||
|
||||
MiddlemanCallContext cx(call, &arguments, MiddlemanCallPhase::MiddlemanRelease);
|
||||
GetRedirection(call->mCallId).mMiddlemanCall(cx);
|
||||
|
||||
delete call;
|
||||
}
|
||||
}
|
||||
|
||||
// Delete the calls in a second pass. The MiddlemanRelease phase depends on
|
||||
// previous middleman calls still existing.
|
||||
for (MiddlemanCall* call : gMiddlemanCalls) {
|
||||
delete call;
|
||||
}
|
||||
|
||||
gMiddlemanCalls.clear();
|
||||
for (auto buffer : gAllocatedBuffers) {
|
||||
free(buffer);
|
||||
}
|
||||
gAllocatedBuffers.clear();
|
||||
gMiddlemanCallMap->clear();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Загрузка…
Ссылка в новой задаче