From 2c63aa2056d564be2fee50a175b3400bdfb96660 Mon Sep 17 00:00:00 2001 From: emersion Date: Tue, 31 Oct 2017 14:21:12 +0100 Subject: Destroy x11 output with backend --- backend/x11/backend.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'backend/x11/backend.c') diff --git a/backend/x11/backend.c b/backend/x11/backend.c index 37bbdaec..97b0dd8c 100644 --- a/backend/x11/backend.c +++ b/backend/x11/backend.c @@ -298,6 +298,9 @@ static void wlr_x11_backend_destroy(struct wlr_backend *backend) { struct wlr_x11_backend *x11 = (struct wlr_x11_backend *)backend; + struct wlr_x11_output *output = &x11->output; + wlr_output_destroy(&output->wlr_output); + wl_event_source_remove(x11->frame_timer); wlr_egl_free(&x11->egl); @@ -331,7 +334,7 @@ static void output_destroy(struct wlr_output *wlr_output) { eglDestroySurface(x11->egl.display, output->surf); xcb_destroy_window(x11->xcb_conn, output->win); - free(wlr_output); + // output has been allocated on the stack, do not free it } static void output_make_current(struct wlr_output *wlr_output) { -- cgit v1.2.3