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

Unified Diff: ui/gfx/color_profile_mac.cc

Issue 12390058: mac: Fix a few memory leaks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cr Created 7 years, 10 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
« skia/ext/skia_utils_mac.mm ('K') | « skia/ext/skia_utils_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/color_profile_mac.cc
diff --git a/ui/gfx/color_profile_mac.cc b/ui/gfx/color_profile_mac.cc
index 4ad1c5788c42f0303f12f405dc7a30f383f73f0b..c313745c07628e4548d1daa984abf7b2d7660a1f 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)
« skia/ext/skia_utils_mac.mm ('K') | « skia/ext/skia_utils_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698