diff -r 66b0accda0a8 -r b036ccad4b49 src/server/safs/init.c --- a/src/server/safs/init.c Sat Aug 24 18:34:13 2024 +0200 +++ b/src/server/safs/init.c Sat Aug 24 22:37:12 2024 +0200 @@ -31,6 +31,7 @@ #include "../daemon/func.h" #include "../daemon/log.h" +#include "../daemon/config.h" #include "init.h" @@ -72,6 +73,7 @@ } // load function symbols + pool_handle_t *init_pool = cfg_get_init_pool(); int b = 0; for(int i=0;;i++) { if(funcs[i] == '-') { @@ -82,6 +84,9 @@ b = 1; } + // TODO: although this works fine, is not really clean to just + // destroy the string with random 0-bytes + // maybe use cxstr here funcs[i] = 0; // we have a function name @@ -94,7 +99,7 @@ struct FuncStruct fc; ZERO(&fc, sizeof(struct FuncStruct)); fc.func = (FuncPtr)sym; - fc.name = cx_strdup(cx_str(funcs)).ptr; + fc.name = pool_strdup(init_pool, funcs); add_function(&fc); if(b) {