[PATCH xserver v2] xwayland: avoid using freed xwl_window on unrealize

Olivier Fourdan ofourdan at redhat.com
Fri Apr 20 06:37:25 UTC 2018


Hi Daniel,

On Thu, Apr 19, 2018 at 5:24 PM, Daniel Stone <daniel at fooishbar.org> wrote:

> [...]
> The callback is passed as an argument to the function directly, so you
> could just destroy that instead.
>

Sure, but that wouldn't solve the problem which is the callback occurs
after the “xwl_window” is freed, meaning that we access freed memory here.
In other words, we could do that (and I agree it would be more elegant) but
that would probably crash on the next line or so.

Removing all frame callbacks when un-realizing the window as done with the
other patch that was merged (thanks Adam!) is safer.

Cheers,
Olivier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x.org/archives/xorg-devel/attachments/20180420/f68006af/attachment.html>


More information about the xorg-devel mailing list