diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-10-10 08:37:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-10 08:37:19 -0400 |
commit | fbddc81b59bdc7ce392fa0ed3ec3733067c8bafe (patch) | |
tree | 1a5ca4c413355f1f8ac331113e3859d634f30f52 | |
parent | 5e65f95389348192b1220cb74678554e967553f6 (diff) | |
parent | d3af2c09c2ebfa16cb012b0333b06b4208923197 (diff) |
Merge pull request #254 from versusvoid/fix-frame-callback-double-free
Destroy callbacks before callback list reinitialization
-rw-r--r-- | types/wlr_surface.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/types/wlr_surface.c b/types/wlr_surface.c index f0cce8a7..9e38d701 100644 --- a/types/wlr_surface.c +++ b/types/wlr_surface.c @@ -158,6 +158,10 @@ static void wlr_surface_update_size(struct wlr_surface *surface, struct wlr_surf _height = tmp; } + struct wlr_frame_callback *cb, *tmp; + wl_list_for_each_safe(cb, tmp, &state->frame_callback_list, link) { + wl_resource_destroy(cb->resource); + } wl_list_init(&state->frame_callback_list); state->width = _width; |