diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-25 02:01:51 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-25 02:01:51 +0000 |
commit | e06d2069077d89276943eca317265dde4c36075f (patch) | |
tree | 1a25ebf881c8e42b97bb0773fbd7cc3dae6baca7 /app | |
parent | 0fe9fa2c897f40d0f6571598e4883906df87c68e (diff) | |
download | chromium_src-e06d2069077d89276943eca317265dde4c36075f.zip chromium_src-e06d2069077d89276943eca317265dde4c36075f.tar.gz chromium_src-e06d2069077d89276943eca317265dde4c36075f.tar.bz2 |
Mac: Fix small leak in iosurface resizing code.
BUG=TEST=none
Review URL: http://codereview.chromium.org/3200011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57279 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r-- | app/surface/accelerated_surface_mac.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/surface/accelerated_surface_mac.cc b/app/surface/accelerated_surface_mac.cc index ef24407..a3cd8b9 100644 --- a/app/surface/accelerated_surface_mac.cc +++ b/app/surface/accelerated_surface_mac.cc @@ -8,6 +8,7 @@ #include "app/gfx/gl/gl_implementation.h" #include "app/surface/io_surface_support_mac.h" #include "base/logging.h" +#include "base/scoped_cftyperef.h" #include "gfx/rect.h" AcceleratedSurface::AcceleratedSurface() @@ -109,8 +110,9 @@ static void AddBooleanValue(CFMutableDictionaryRef dictionary, static void AddIntegerValue(CFMutableDictionaryRef dictionary, const CFStringRef key, int32 value) { - CFNumberRef number = CFNumberCreate(NULL, kCFNumberSInt32Type, &value); - CFDictionaryAddValue(dictionary, key, number); + scoped_cftyperef<CFNumberRef> number( + CFNumberCreate(NULL, kCFNumberSInt32Type, &value)); + CFDictionaryAddValue(dictionary, key, number.get()); } void AcceleratedSurface::AllocateRenderBuffers(GLenum target, |