summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-11 20:47:09 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-11 20:47:09 +0000
commit6bf53787f3b60f79b7ed7c69ec820f88193b629e (patch)
tree904d2e5e6aadacd5599f4da229669215abccacc8
parente219f4b94c9ec175836056d976da5725970f35c3 (diff)
downloadchromium_src-6bf53787f3b60f79b7ed7c69ec820f88193b629e.zip
chromium_src-6bf53787f3b60f79b7ed7c69ec820f88193b629e.tar.gz
chromium_src-6bf53787f3b60f79b7ed7c69ec820f88193b629e.tar.bz2
Fixes leak in BackingStore as shown by valgrind. XFree doesn't free
the data of the image, where as XDestroyImage does. BUG=none TEST=none Review URL: http://codereview.chromium.org/386003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31699 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/renderer_host/backing_store_x.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/renderer_host/backing_store_x.cc b/chrome/browser/renderer_host/backing_store_x.cc
index c1ddad9..25fcf28 100644
--- a/chrome/browser/renderer_host/backing_store_x.cc
+++ b/chrome/browser/renderer_host/backing_store_x.cc
@@ -414,7 +414,7 @@ SkBitmap BackingStore::PaintRectToBitmap(const gfx::Rect& rect) {
if (use_shared_memory_)
DestroySharedImage(display_, image, &shminfo);
else
- XFree(image);
+ XDestroyImage(image);
return SkBitmap();
}
@@ -431,7 +431,7 @@ SkBitmap BackingStore::PaintRectToBitmap(const gfx::Rect& rect) {
if (use_shared_memory_)
DestroySharedImage(display_, image, &shminfo);
else
- XFree(image);
+ XDestroyImage(image);
HISTOGRAM_TIMES("BackingStore.RetrievalFromX",
base::TimeTicks::Now() - begin_time);