Cleanup some leaks/incorrect destructions

This commit is contained in:
nyorain 2017-06-20 19:01:20 +02:00
parent a96d90dec4
commit 51f35e7af0
3 changed files with 12 additions and 1 deletions

View file

@ -6,6 +6,7 @@
#include <wlr/types.h>
#include "backend/wayland.h"
#include "common/log.h"
#include "types.h"
#include <EGL/egl.h>
#include <EGL/eglext.h>
@ -79,6 +80,12 @@ static void wlr_wl_backend_destroy(struct wlr_backend_state *state) {
wlr_output_destroy(state->outputs[i]);
}
for (size_t i = 0; state->devices && i < state->devices->length; ++i) {
wlr_input_device_destroy(state->devices->items[i]);
}
list_free(state->devices);
wlr_egl_free(&state->egl);
free(state->outputs);
if (state->seat) wl_seat_destroy(state->seat);