Skip to content

Commit

Permalink
Merge pull request #9 from ianyfan/master
Browse files Browse the repository at this point in the history
Fix memory leaks
  • Loading branch information
emersion authored Aug 15, 2018
2 parents d05e1f7 + 7a003c5 commit 57bae56
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 57bae56

Please sign in to comment.