diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-25 21:10:36 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-25 21:10:36 +0000 |
commit | 1b89fe3a0539ed8b6c9b22fa3aed7ecdc94e596a (patch) | |
tree | fc8f1d36daf6e8d9f7d6d270e20fe05426a16c29 /net | |
parent | 358f2dfd271ae7596aff01ed2ede9e9e7028c991 (diff) | |
download | chromium_src-1b89fe3a0539ed8b6c9b22fa3aed7ecdc94e596a.zip chromium_src-1b89fe3a0539ed8b6c9b22fa3aed7ecdc94e596a.tar.gz chromium_src-1b89fe3a0539ed8b6c9b22fa3aed7ecdc94e596a.tar.bz2 |
net: Fix RAII fail. Found by clang.
Potentially serious.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10451044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139117 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/base/network_change_notifier.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/base/network_change_notifier.cc b/net/base/network_change_notifier.cc index 7f5d901..9183532 100644 --- a/net/base/network_change_notifier.cc +++ b/net/base/network_change_notifier.cc @@ -88,7 +88,7 @@ NetworkChangeNotifier::GetConnectionType() { bool NetworkChangeNotifier::IsWatchingDNS() { if (!g_network_change_notifier) return false; - base::AutoLock(g_network_change_notifier->watching_dns_lock_); + base::AutoLock lock(g_network_change_notifier->watching_dns_lock_); return g_network_change_notifier->watching_dns_; } @@ -167,7 +167,7 @@ void NetworkChangeNotifier::NotifyObserversOfIPAddressChange() { void NetworkChangeNotifier::NotifyObserversOfDNSChange(unsigned detail) { if (g_network_change_notifier) { { - base::AutoLock(g_network_change_notifier->watching_dns_lock_); + base::AutoLock lock(g_network_change_notifier->watching_dns_lock_); if (detail & NetworkChangeNotifier::CHANGE_DNS_WATCH_STARTED) { g_network_change_notifier->watching_dns_ = true; } else if (detail & NetworkChangeNotifier::CHANGE_DNS_WATCH_FAILED) { |