From 78f5f83627c8565946b9b636a6f86712b85779a9 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sun, 11 Jun 2023 20:06:47 -0700 Subject: modules/compose: destroy_context() can't get passed NULL The modules don't have to defend against this, vestigial from simpler times --- src/modules/compose/compose.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/modules/compose/compose.c b/src/modules/compose/compose.c index 957d176..cf1c9b1 100644 --- a/src/modules/compose/compose.c +++ b/src/modules/compose/compose.c @@ -220,15 +220,13 @@ static void compose_setup_free(til_setup_t *setup) { compose_setup_t *s = (compose_setup_t *)setup; - if (s) { - for (size_t i = 0; i < s->n_layers; i++) { - free(s->layers[i].module); - til_setup_free(s->layers[i].setup); - } - til_setup_free(s->texture.setup); - free(s->texture.module); - free(setup); + for (size_t i = 0; i < s->n_layers; i++) { + free(s->layers[i].module); + til_setup_free(s->layers[i].setup); } + til_setup_free(s->texture.setup); + free(s->texture.module); + free(setup); } -- cgit v1.2.3