Bug 89561

Summary: [Cairo] Fix memory leak in GraphicsContext3DCairo.cpp
Product: WebKit Reporter: Sudarsana Nagineni (babu) <naginenis>
Component: WebKitGTKAssignee: Sudarsana Nagineni (babu) <naginenis>
Severity: Normal CC: mrobinson, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
Patch none

Description Sudarsana Nagineni (babu) 2012-06-20 04:54:33 PDT
Memory leak found in GraphicsContext3D::getImageData()

==25464== 1,944 (24 direct, 1,920 indirect) bytes in 3 blocks are definitely lost in loss record 16,777 of 17,337
==25464==    at 0x4C2B1C7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==25464==    by 0x6C3E543: WebCore::ImageFrame::asNewNativeImage() const (ImageDecoderCairo.cpp:37)
==25464==    by 0x6C01543: WebCore::ImageSource::createFrameAtIndex(unsigned long) (ImageSource.cpp:156)
==25464==    by 0x71C52DE: WebCore::GraphicsContext3D::getImageData(WebCore::Image*, unsigned int, unsigned int, bool, bool, WTF::Vector<unsigned char, 0ul>&) (GraphicsContext3DCairo.cpp:162)
==25464==    by 0x71B3CA7: WebCore::GraphicsContext3D::extractImageData(WebCore::Image*, unsigned int, unsigned int, bool, bool, bool, WTF::Vector<unsigned char, 0ul>&) (GraphicsContext3D.cpp:180)
==25464==    by 0x719CC8F: WebCore::WebGLRenderingContext::texImage2DImpl(unsigned int, int, unsigned int, unsigned int, unsigned int, WebCore::Image*, bool, bool, int&) (WebGLRenderingContext.cpp:3548)
==25464==    by 0x719D288: WebCore::WebGLRenderingContext::texImage2D(unsigned int, int, unsigned int, unsigned int, unsigned int, WebCore::HTMLImageElement*, int&) (WebGLRenderingContext.cpp:3620)
==25464==    by 0x74BB08F: WebCore::jsWebGLRenderingContextPrototypeFunctionTexImage2D3(JSC::ExecState*) (JSWebGLRenderingContext.cpp:3239)
==25464==    by 0x74BBB61: WebCore::jsWebGLRenderingContextPrototypeFunctionTexImage2D(JSC::ExecState*) (JSWebGLRenderingContext.cpp:3326)
Comment 1 Sudarsana Nagineni (babu) 2012-06-20 05:51:41 PDT
Created attachment 148542 [details]

Patch fixes a memory leak.
Comment 2 WebKit Review Bot 2012-06-20 09:07:48 PDT
Comment on attachment 148542 [details]

Clearing flags on attachment: 148542

Committed r120826: <http://trac.webkit.org/changeset/120826>
Comment 3 WebKit Review Bot 2012-06-20 09:07:55 PDT
All reviewed patches have been landed.  Closing bug.