Bug 153413 - Colormap should be freed when XWindow is destroyed on X11Helper.
Summary: Colormap should be freed when XWindow is destroyed on X11Helper.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-24 18:13 PST by Sun-woo Nam
Modified: 2016-02-01 16:46 PST (History)
7 users (show)

See Also:


Attachments
Patch (5.01 KB, patch)
2016-01-24 18:20 PST, Sun-woo Nam
no flags Details | Formatted Diff | Diff
Patch (1.59 KB, patch)
2016-01-24 18:22 PST, Sun-woo Nam
no flags Details | Formatted Diff | Diff

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