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

Unified Diff: chrome/browser/extensions/syncable_extension_settings_storage.cc

Issue 7978051: Fix memory leak in SyncableExtensionSettingsStorage. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 3 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 | tools/heapcheck/suppressions.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/syncable_extension_settings_storage.cc
diff --git a/chrome/browser/extensions/syncable_extension_settings_storage.cc b/chrome/browser/extensions/syncable_extension_settings_storage.cc
index 137a6cb223783a420d1ce5589eaf57c25609f123..173ce28166785c819a2d80d34cc822dbb7e296ed 100644
--- a/chrome/browser/extensions/syncable_extension_settings_storage.cc
+++ b/chrome/browser/extensions/syncable_extension_settings_storage.cc
@@ -185,6 +185,9 @@ SyncError SyncableExtensionSettingsStorage::OverwriteLocalSettingsWithSync(
changes.push_back(
ExtensionSettingSyncData(
SyncChange::ACTION_UPDATE, extension_id_, *it, sync_value));
+ } else {
+ // Values are the same, no change needed.
+ delete sync_value;
}
} else {
// Not synced, delete local setting.
« no previous file with comments | « no previous file | tools/heapcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698