1
1
Fork 0
mirror of https://github.com/swaywm/sway synced 2024-04-26 15:55:17 +02:00

swaybar: fix cairo_font_options leak

This commit is contained in:
Nathan Schulte 2021-09-14 04:02:49 -05:00 committed by Simon Ser
parent a47f8ef478
commit 83310f5abf

View File

@ -813,9 +813,7 @@ void render_frame(struct swaybar_output *output) {
output->width * output->scale,
output->height * output->scale);
if (!output->current_buffer) {
cairo_surface_destroy(recorder);
cairo_destroy(cairo);
return;
goto cleanup;
}
cairo_t *shm = output->current_buffer->cairo;
@ -840,6 +838,7 @@ void render_frame(struct swaybar_output *output) {
wl_surface_commit(output->surface);
}
cleanup:
if (ctx.textaa_sharp != ctx.textaa_safe) {
cairo_font_options_destroy(ctx.textaa_sharp);
}