Bug 89561 - [Cairo] Fix memory leak in GraphicsContext3DCairo.cpp
Summary: [Cairo] Fix memory leak in GraphicsContext3DCairo.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sudarsana Nagineni (babu)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-20 04:54 PDT by Sudarsana Nagineni (babu)
Modified: 2012-06-20 09:07 PDT (History)
2 users (show)

See Also:


Attachments
Patch (1.73 KB, patch)
2012-06-20 05:51 PDT, Sudarsana Nagineni (babu)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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

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

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.