Fix a memory leak in message_center_settings_controller.cc.

Found by the Mac OS X 'leaks' tool; fixed on a plane.

BUG=292905

Review URL: https://chromiumcodereview.appspot.com/24188002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223503 0039d316-1c4b-4281-b951-d872f2087c98
parent 02e70846
...@@ -371,15 +371,14 @@ void MessageCenterSettingsController::RebuildNotifierGroups() { ...@@ -371,15 +371,14 @@ void MessageCenterSettingsController::RebuildNotifierGroups() {
const size_t count = profile_info_cache_->GetNumberOfProfiles(); const size_t count = profile_info_cache_->GetNumberOfProfiles();
for (size_t i = 0; i < count; ++i) { for (size_t i = 0; i < count; ++i) {
message_center::ProfileNotifierGroup* group = scoped_ptr<message_center::ProfileNotifierGroup> group(
new message_center::ProfileNotifierGroup( new message_center::ProfileNotifierGroup(
profile_info_cache_->GetAvatarIconOfProfileAtIndex(i), profile_info_cache_->GetAvatarIconOfProfileAtIndex(i),
profile_info_cache_->GetNameOfProfileAtIndex(i), profile_info_cache_->GetNameOfProfileAtIndex(i),
profile_info_cache_->GetUserNameOfProfileAtIndex(i), profile_info_cache_->GetUserNameOfProfileAtIndex(i),
i, i,
profile_info_cache_->GetPathOfProfileAtIndex(i)); profile_info_cache_->GetPathOfProfileAtIndex(i)));
if (group->profile() != NULL) { if (group->profile() != NULL)
notifier_groups_.push_back(group); notifier_groups_.push_back(group.release());
}
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment