Bug 781380 - Fix cairo surface memory leak in DrawTargetCairo::DrawSurfaceWithShadow(). r=roc
authorAnthony Jones <ajones@mozilla.com>
Thu, 23 Aug 2012 19:50:59 -0400
changeset 105288 e137f28dfe7043a5ab7531fd2989c610092826a1
parent 105287 c97a0ffcf50061f24a924001ca46064f18ef3857
child 105289 90e517924f06a56e4bcea68cc01c38228dfc639a
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewersroc
bugs781380
milestone17.0a1
Bug 781380 - Fix cairo surface memory leak in DrawTargetCairo::DrawSurfaceWithShadow(). r=roc
gfx/2d/DrawTargetCairo.cpp
--- a/gfx/2d/DrawTargetCairo.cpp
+++ b/gfx/2d/DrawTargetCairo.cpp
@@ -461,16 +461,17 @@ DrawTargetCairo::DrawSurfaceWithShadow(S
     cairo_clip(mContext);
   }
 
   cairo_paint(mContext);
 
   cairo_restore(mContext);
 
   cairo_pattern_destroy(pat);
+  cairo_surface_destroy(blursurf);
 }
 
 void
 DrawTargetCairo::DrawPattern(const Pattern& aPattern,
                              const StrokeOptions& aStrokeOptions,
                              const DrawOptions& aOptions,
                              DrawPatternType aDrawType)
 {