summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-01 18:51:06 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-01 18:51:06 +0000
commit9e62aeb309601183a4c4c5e9b815266363f94d95 (patch)
treea5706c33b6165d486112d3790b2bedd53403bedb /net
parent9e1084c19d907e9ac5f5c12f6d40d4eb1ef9c877 (diff)
downloadchromium_src-9e62aeb309601183a4c4c5e9b815266363f94d95.zip
chromium_src-9e62aeb309601183a4c4c5e9b815266363f94d95.tar.gz
chromium_src-9e62aeb309601183a4c4c5e9b815266363f94d95.tar.bz2
Fix invalid read in HostResolverImpl::OnIPAddressChanged.
BUG=54090 TEST=HostResolverImplTest.OnlyAbortExistingRequestsOnIPAddressChange Review URL: http://codereview.chromium.org/3348001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58209 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/base/host_resolver_impl.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc
index b93ae31..2118cb4 100644
--- a/net/base/host_resolver_impl.cc
+++ b/net/base/host_resolver_impl.cc
@@ -1210,7 +1210,6 @@ void HostResolverImpl::OnIPAddressChanged() {
ipv6_probe_job_ = new IPv6ProbeJob(this);
ipv6_probe_job_->Start();
}
- AbortAllJobs();
#if defined(OS_LINUX)
if (HaveOnlyLoopbackAddresses()) {
additional_resolver_flags_ |= HOST_RESOLVER_LOOPBACK_ONLY;
@@ -1218,6 +1217,8 @@ void HostResolverImpl::OnIPAddressChanged() {
additional_resolver_flags_ &= ~HOST_RESOLVER_LOOPBACK_ONLY;
}
#endif
+ AbortAllJobs();
+ // |this| may be deleted inside AbortAllJobs().
}
void HostResolverImpl::DiscardIPv6ProbeJob() {