diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-11-03 11:56:52 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-11-03 11:56:52 -0700 |
commit | 6c308c6f1220bc8ba4c3aa54510ad852123421e4 (patch) | |
tree | 2f849f90e2873ea2b2a8bf8a4a476823df91b7d4 /src/modules/rkt | |
parent | d9f0a3edace7eac5679a5bb33f18ff176cf7f877 (diff) |
modules/*: drop til_setup_t.free_func() NULL setup checks
Trivial cleanup. These are unnecessary nowadays since
til_setup_free() won't invoke the free_func() on a NULL setup,
and everything uses til_setup_free() to free a til_setup_t.
Diffstat (limited to 'src/modules/rkt')
-rw-r--r-- | src/modules/rkt/rkt.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/modules/rkt/rkt.c b/src/modules/rkt/rkt.c index 2e8e696..8790f53 100644 --- a/src/modules/rkt/rkt.c +++ b/src/modules/rkt/rkt.c @@ -387,15 +387,13 @@ static void rkt_setup_free(til_setup_t *setup) { rkt_setup_t *s = (rkt_setup_t *)setup; - if (s) { - for (size_t i = 0; i < s->n_scenes; i++) - til_setup_free(s->scenes[i].setup); - - free((void *)s->base); - free((void *)s->host); - free((void *)s->scener_address); - free(setup); - } + for (size_t i = 0; i < s->n_scenes; i++) + til_setup_free(s->scenes[i].setup); + + free((void *)s->base); + free((void *)s->host); + free((void *)s->scener_address); + free(setup); } |