mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
fixes bug 287956 "Crash shortly after program start [@nsProtocolProxyService::PruneProxyInfo]" r=biesi
This commit is contained in:
parent
725c0286d6
commit
cf665de8d7
@ -1319,16 +1319,21 @@ nsProtocolProxyService::PruneProxyInfo(const nsProtocolInfo &info,
|
||||
|
||||
// Start by removing all disallowed proxies if required:
|
||||
if (!(info.flags & nsIProtocolHandler::ALLOWS_PROXY_HTTP)) {
|
||||
nsProxyInfo *last = nsnull;
|
||||
for (nsProxyInfo *iter = head; iter; iter = iter->mNext, last = iter) {
|
||||
nsProxyInfo *last = nsnull, *iter = head;
|
||||
while (iter) {
|
||||
if (iter->Type() == kProxyType_HTTP) {
|
||||
// reject!
|
||||
if (last)
|
||||
last->mNext = iter->mNext;
|
||||
else
|
||||
head = iter->mNext;
|
||||
nsProxyInfo *next = iter->mNext;
|
||||
iter->mNext = nsnull;
|
||||
NS_RELEASE(iter);
|
||||
iter->Release();
|
||||
iter = next;
|
||||
} else {
|
||||
last = iter;
|
||||
iter = iter->mNext;
|
||||
}
|
||||
}
|
||||
if (!head)
|
||||
|
Loading…
Reference in New Issue
Block a user