diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-07-03 07:37:19 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-07-04 21:09:16 -0700 |
commit | e391cbd1215569ee7654b1d93153fcd14c2a60a7 (patch) | |
tree | 888aa686a4584884562e58655857297045efca08 | |
parent | 8ef18ed5d0caa2a1bedc76004443a4c30c92c6f0 (diff) |
til: optionally finalize in til_module_setup()
This was assuming non-NULL res_setup which would assert in
til_module_setup_finalize() which doesn't expect a NULL
res_setup since that's its entire purpose.
It's not a bug that was actually triggered by any callers (yet)
-rw-r--r-- | src/til.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -512,7 +512,10 @@ int til_module_setup(const til_settings_t *settings, til_setting_t **res_setting if (module->setup) return module->setup(settings, res_setting, res_desc, res_setup); - return til_module_setup_finalize(module, settings, res_setup); + if (res_setup) + return til_module_setup_finalize(module, settings, res_setup); + + return 0; } |