diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-10-05 13:08:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-05 13:08:18 -0400 |
commit | cec012019f6146b1376bb787dc96b73c7de82266 (patch) | |
tree | 383ea29795a696159cc35dfc9b30cfd251742895 /rootston | |
parent | 77eae178c725d13fee4862718af2a3029b128f41 (diff) | |
parent | c5df6ca900cb445b88ede7e0ea3bb3a9042b5b6f (diff) |
Merge pull request #208 from versusvoid/memory
Fix memory leaks
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/input.c | 5 | ||||
-rw-r--r-- | rootston/main.c | 1 | ||||
-rw-r--r-- | rootston/output.c | 1 |
3 files changed, 3 insertions, 4 deletions
diff --git a/rootston/input.c b/rootston/input.c index 9700b840..86a87e24 100644 --- a/rootston/input.c +++ b/rootston/input.c @@ -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 diff --git a/rootston/main.c b/rootston/main.c index 65a06a2f..5a60000c 100644 --- a/rootston/main.c +++ b/rootston/main.c @@ -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; } diff --git a/rootston/output.c b/rootston/output.c index 14d1783e..bbc957aa 100644 --- a/rootston/output.c +++ b/rootston/output.c @@ -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); } |