xwayland/window-manager: Handle weston_wm_window's name/class destruction

Memleak found by ASAN:

Direct leak of 21 byte(s) in 1 object(s) allocated from:
    #0 0x7fe7a917fe8f in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.6+0xa9e8f)
    #1 0x7fe7a9129874  (/usr/lib/x86_64-linux-gnu/libasan.so.6+0x53874)
    #2 0x7fe7a5a23469 in weston_wm_window_read_properties ../xwayland/window-manager.c:574
    #3 0x7fe7a5a28d3b in weston_wm_handle_map_request ../xwayland/window-manager.c:1178
    #4 0x7fe7a5a31660 in weston_wm_handle_event ../xwayland/window-manager.c:2291
    #5 0x7fe7a8c261a1 in wl_event_loop_dispatch ../src/event-loop.c:1027

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
dev
Marius Vlad 4 years ago
parent 4c7dbe6ab2
commit cdeeb881a0
  1. 4
      xwayland/window-manager.c

@ -1555,6 +1555,10 @@ weston_wm_window_destroy(struct weston_wm_window *window)
if (window->surface)
wl_list_remove(&window->surface_destroy_listener.link);
free(window->class);
free(window->name);
free(window->machine);
hash_table_remove(window->wm->window_hash, window->id);
free(window);
}

Loading…
Cancel
Save