From 3391391baa6d416f8192dcfa2258daceb59f12db Mon Sep 17 00:00:00 2001 From: Tyler Date: Tue, 16 Jun 2026 19:31:45 -0700 Subject: [PATCH] Call module_close() after freeing the string name to avoid a segfault In the existing order there is a valgrind confirmed segfault when we free `record->filename` after the module was closed. Signed-off-by: tyler --- src/verto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/verto.c b/src/verto.c index 643474e..940eba5 100644 --- a/src/verto.c +++ b/src/verto.c @@ -613,10 +613,10 @@ verto_cleanup(void) module_record *record; mutex_lock(&loaded_modules_mutex); - + for (record = loaded_modules; record; record = record->next) { - module_close(record->dll); free(record->filename); + module_close(record->dll); } vfree(loaded_modules);