summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui/shown_sections_handler.cc
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-15 20:12:17 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-15 20:12:17 +0000
commitd9194223c0a66fbb6b673778ee576d3815306e1f (patch)
tree28e6d0dbf68f1d72e37e57e2b903fccb1cbf93a5 /chrome/browser/dom_ui/shown_sections_handler.cc
parent6ed457ea80358fdb4d0d6901cf80568b23eae2f8 (diff)
downloadchromium_src-d9194223c0a66fbb6b673778ee576d3815306e1f.zip
chromium_src-d9194223c0a66fbb6b673778ee576d3815306e1f.tar.gz
chromium_src-d9194223c0a66fbb6b673778ee576d3815306e1f.tar.bz2
Fix leak in ShownSectionsHandler::HandleGetShownSections and
potential leak of default_favicon_ in DOMUIFavIconSource. BUG=16818 TEST=valgrind ui_tests Review URL: http://codereview.chromium.org/155579 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20777 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui/shown_sections_handler.cc')
-rw-r--r--chrome/browser/dom_ui/shown_sections_handler.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/dom_ui/shown_sections_handler.cc b/chrome/browser/dom_ui/shown_sections_handler.cc
index 353dae9..ad05112 100644
--- a/chrome/browser/dom_ui/shown_sections_handler.cc
+++ b/chrome/browser/dom_ui/shown_sections_handler.cc
@@ -19,8 +19,8 @@ void ShownSectionsHandler::RegisterMessages() {
void ShownSectionsHandler::HandleGetShownSections(const Value* value) {
const int mode = dom_ui_->GetProfile()->GetPrefs()->
GetInteger(prefs::kNTPShownSections);
- FundamentalValue* mode_value = new FundamentalValue(mode);
- dom_ui_->CallJavascriptFunction(L"onShownSections", *mode_value);
+ FundamentalValue mode_value(mode);
+ dom_ui_->CallJavascriptFunction(L"onShownSections", mode_value);
}
void ShownSectionsHandler::HandleSetShownSections(const Value* value) {