From 6c308c6f1220bc8ba4c3aa54510ad852123421e4 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Fri, 3 Nov 2023 11:56:52 -0700 Subject: 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. --- src/modules/rkt/rkt.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/modules/rkt') 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); } -- cgit v1.2.3