Fix memory leaks

This commit is contained in:
Versus Void 2017-10-05 20:01:56 +00:00
parent edadbc7c7f
commit c5df6ca900
9 changed files with 23 additions and 6 deletions

View file

@ -79,9 +79,8 @@ struct roots_input *input_create(struct roots_server *server,
input->config = config;
input->server = server;
struct wlr_xcursor_theme *theme;
assert(theme = wlr_xcursor_theme_load("default", 16));
assert(input->xcursor = wlr_xcursor_theme_get_cursor(theme, "left_ptr"));
assert(input->theme = wlr_xcursor_theme_load("default", 16));
assert(input->xcursor = wlr_xcursor_theme_get_cursor(input->theme, "left_ptr"));
assert(input->wl_seat = wlr_seat_create(server->wl_display, "seat0"));
wlr_seat_set_capabilities(input->wl_seat, WL_SEAT_CAPABILITY_KEYBOARD

View file

@ -43,5 +43,6 @@ int main(int argc, char **argv) {
setenv("WAYLAND_DISPLAY", socket, true);
wl_display_run(server.wl_display);
wlr_backend_destroy(server.backend);
return 0;
}

View file

@ -147,6 +147,5 @@ void output_remove_notify(struct wl_listener *listener, void *data) {
// sample->compositor);
wl_list_remove(&output->link);
wl_list_remove(&output->frame.link);
wl_list_remove(&output->resolution.link);
free(output);
}