Bug 974314 - Fix memleak in CreateDrawTargetForData when backend is skia. r=gal
authorAli Akhtarzada <ali@comoyo.com>
Wed, 19 Feb 2014 11:37:26 -0500
changeset 169883 3a5b5ba79aeb0cee53d2b0a0c616437315ec52ed
parent 169882 521123eb35841d08084818e2799c19b8441cb73f
child 169884 3f443622555e5bf0b4b901b2359b03f935981c5a
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersgal
bugs974314
milestone30.0a1
Bug 974314 - Fix memleak in CreateDrawTargetForData when backend is skia. r=gal
gfx/2d/Factory.cpp
--- a/gfx/2d/Factory.cpp
+++ b/gfx/2d/Factory.cpp
@@ -333,16 +333,17 @@ Factory::CreateDrawTargetForData(Backend
   switch (aBackend) {
 #ifdef USE_SKIA
   case BackendType::SKIA:
     {
       RefPtr<DrawTargetSkia> newTarget;
       newTarget = new DrawTargetSkia();
       newTarget->Init(aData, aSize, aStride, aFormat);
       retVal = newTarget;
+      break;
     }
 #endif
 #ifdef XP_MACOSX
   case BackendType::COREGRAPHICS:
     {
       RefPtr<DrawTargetCG> newTarget = new DrawTargetCG();
       if (newTarget->Init(aBackend, aData, aSize, aStride, aFormat))
         return newTarget;