Skip to content

Commit

Permalink
Fix memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ianyfan committed Aug 15, 2018
1 parent d05e1f7 commit 7a003c5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ static void create_pointer(struct slurp_state *state,

static void destroy_pointer(struct slurp_pointer *pointer) {
wl_list_remove(&pointer->link);
wl_surface_destroy(pointer->cursor_surface);
wl_pointer_destroy(pointer->wl_pointer);
free(pointer);
}
Expand Down Expand Up @@ -196,6 +197,7 @@ static void destroy_output(struct slurp_output *output) {
}
finish_buffer(&output->buffers[0]);
finish_buffer(&output->buffers[1]);
wl_cursor_theme_destroy(output->cursor_theme);
zwlr_layer_surface_v1_destroy(output->layer_surface);
wl_surface_destroy(output->surface);
wl_output_destroy(output->wl_output);
Expand Down

0 comments on commit 7a003c5

Please sign in to comment.