Bug 153413

Summary: Colormap should be freed when XWindow is destroyed on X11Helper.
Product: WebKit Reporter: Sun-woo Nam <sunny.nam>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, commit-queue, gyuyoung.kim, mcatanzaro, mrobinson, yoon, zan
Priority: P2    
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Sun-woo Nam 2016-01-24 18:13:20 PST
Colormap is needed to create XWindow and it should be freed when XWindow is destroyed.
Unless Colormap is freed before destroying XWindow, memory leak is suspected.
XFreeColormap therefore is needed on X11Helper.
Comment 1 Sun-woo Nam 2016-01-24 18:20:15 PST
Created attachment 269712 [details]
Patch
Comment 2 Sun-woo Nam 2016-01-24 18:22:11 PST
Created attachment 269713 [details]
Patch
Comment 3 Zan Dobersek 2016-02-01 06:12:42 PST
Comment on attachment 269713 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=269713&action=review

> Source/WebCore/platform/graphics/surfaces/glx/X11Helper.cpp:296
> +    XWindowAttributes attribute;
> +    XGetWindowAttributes(display, windowId, &attribute);
> +
> +    XFreeColormap(display, attribute.colormap);

r=me
Comment 4 Michael Catanzaro 2016-02-01 15:58:59 PST
Comment on attachment 269713 [details]
Patch

Thanks!
Comment 5 WebKit Commit Bot 2016-02-01 16:46:39 PST
Comment on attachment 269713 [details]
Patch

Clearing flags on attachment: 269713

Committed r195992: <http://trac.webkit.org/changeset/195992>
Comment 6 WebKit Commit Bot 2016-02-01 16:46:42 PST
All reviewed patches have been landed.  Closing bug.