Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Unified Diff: chrome/browser/policy/configuration_policy_store_interface.cc

Issue 6873036: Plugged memory leak in FilteringPolicyStoreInterface::Apply. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/configuration_policy_store_interface.cc
diff --git a/chrome/browser/policy/configuration_policy_store_interface.cc b/chrome/browser/policy/configuration_policy_store_interface.cc
index a9821e18031afacf90bc53f02fe7b01594c9a629..e243eaec5a66ec57fb77dec8f75adcacef0f7cc4 100644
--- a/chrome/browser/policy/configuration_policy_store_interface.cc
+++ b/chrome/browser/policy/configuration_policy_store_interface.cc
@@ -30,8 +30,11 @@ void ObservingPolicyStoreInterface::Apply(ConfigurationPolicyType policy,
void FilteringPolicyStoreInterface::Apply(ConfigurationPolicyType policy,
Value* value) {
+ // Apply() takes ownership of |value|.
if (IsProxyPolicy(policy) && apply_proxy_policies_)
next_->Apply(policy, value);
+ else
+ delete value;
}
} // namespace policy
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698