diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-06-11 20:06:47 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-06-11 21:53:50 -0700 |
commit | 78f5f83627c8565946b9b636a6f86712b85779a9 (patch) | |
tree | a5ed1ab07ccce62c388c44fe75610df2cb88a7ca /src/modules | |
parent | 5fac4cbdecb6b1d426c5c37e8072cc1beaad83b5 (diff) |
modules/compose: destroy_context() can't get passed NULL
The modules don't have to defend against this, vestigial from
simpler times
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/compose/compose.c | 14 |
1 files changed, 6 insertions, 8 deletions
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); } |