Fix a potential use-after-free

This commit is contained in:
Martin Dørum 2020-10-14 23:12:27 +02:00 committed by Simon Ser
parent c46a5197a2
commit 235b925df7

2
main.c
View File

@ -102,6 +102,8 @@ static void destroy_surface(struct swaylock_surface *surface) {
} }
destroy_buffer(&surface->buffers[0]); destroy_buffer(&surface->buffers[0]);
destroy_buffer(&surface->buffers[1]); destroy_buffer(&surface->buffers[1]);
destroy_buffer(&surface->indicator_buffers[0]);
destroy_buffer(&surface->indicator_buffers[1]);
wl_output_destroy(surface->output); wl_output_destroy(surface->output);
free(surface); free(surface);
} }