diff options
author | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-19 00:23:34 +0000 |
---|---|---|
committer | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-19 00:23:34 +0000 |
commit | 82d3328cdd0d612f3328b40a368900c3f80d1a4d (patch) | |
tree | 266af870e47354ac82b70d021f44d97d53a1eeb6 /chrome/browser/cocoa/cookies_window_controller.mm | |
parent | 1ededee8107fd0e40e6371a5d35f7d2b451ca433 (diff) | |
download | chromium_src-82d3328cdd0d612f3328b40a368900c3f80d1a4d.zip chromium_src-82d3328cdd0d612f3328b40a368900c3f80d1a4d.tar.gz chromium_src-82d3328cdd0d612f3328b40a368900c3f80d1a4d.tar.bz2 |
Fix a leak in -[CookiesWindowContrller loadTreeModelFromProfile] from r36497.
TBR=jrg
BUG=none
TEST=Mac Valgrind unit_tests
Review URL: http://codereview.chromium.org/552036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36500 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/cookies_window_controller.mm')
-rw-r--r-- | chrome/browser/cocoa/cookies_window_controller.mm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/cookies_window_controller.mm b/chrome/browser/cocoa/cookies_window_controller.mm index 8f925fd..8325f3a 100644 --- a/chrome/browser/cocoa/cookies_window_controller.mm +++ b/chrome/browser/cocoa/cookies_window_controller.mm @@ -297,7 +297,9 @@ CocoaCookieTreeNode* CookiesTreeModelObserverBridge::FindCocoaNode( // Create the Cocoa model. CookieTreeNode* root = static_cast<CookieTreeNode*>(treeModel_->GetRoot()); - [self setCocoaTreeModel:[[CocoaCookieTreeNode alloc] initWithNode:root]]; + scoped_nsobject<CocoaCookieTreeNode> model( + [[CocoaCookieTreeNode alloc] initWithNode:root]); + [self setCocoaTreeModel:model.get()]; // Takes ownership. } @end |