summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-04 14:53:56 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-04 14:53:56 +0000
commitd409e1de8df58f0e5780cef9fa5c738a4984fc37 (patch)
tree1aee9a1d69e9b51d30a060346248c12f5d28f590 /ui
parent166dfbbe59d85acac3e15aa6792634d6b2dab43a (diff)
downloadchromium_src-d409e1de8df58f0e5780cef9fa5c738a4984fc37.zip
chromium_src-d409e1de8df58f0e5780cef9fa5c738a4984fc37.tar.gz
chromium_src-d409e1de8df58f0e5780cef9fa5c738a4984fc37.tar.bz2
mac: Fix a few memory leaks.
All found by clang's static analyzer. BUG=none Review URL: https://codereview.chromium.org/12390058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185895 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/gfx/color_profile_mac.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/gfx/color_profile_mac.cc b/ui/gfx/color_profile_mac.cc
index 4ad1c57..c313745 100644
--- a/ui/gfx/color_profile_mac.cc
+++ b/ui/gfx/color_profile_mac.cc
@@ -10,7 +10,8 @@ namespace gfx {
void ReadColorProfile(std::vector<char>* profile) {
CGColorSpaceRef monitor_color_space(base::mac::GetSystemColorSpace());
- CFDataRef icc_profile(CGColorSpaceCopyICCProfile(monitor_color_space));
+ base::mac::ScopedCFTypeRef<CFDataRef> icc_profile(
+ CGColorSpaceCopyICCProfile(monitor_color_space));
if (icc_profile) {
size_t length = CFDataGetLength(icc_profile);
if (length > gfx::kMaxProfileLength)