From: Jo-Philipp Wich Date: Fri, 12 Aug 2022 19:30:18 +0000 (+0200) Subject: ucode: initialize search path before VM init X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=e3395cd90bed9b7b9fc319e79528fedcc0d947fe;p=project%2Fuhttpd.git ucode: initialize search path before VM init Since the VM initialization copies the search path into a runtime array, we must prepare the path beforehand. Fixes: 8cb3f85 ("ucode: initialize default library search path") Signed-off-by: Jo-Philipp Wich --- diff --git a/ucode.c b/ucode.c index 01de012..aa5d5b4 100644 --- a/ucode.c +++ b/ucode.c @@ -229,9 +229,9 @@ uh_ucode_state_init(struct ucode_prefix *ucode) uc_value_t *v; int exitcode; + uc_search_path_init(&config.module_search_path); uc_vm_init(vm, &config); uc_stdlib_load(uc_vm_scope_get(vm)); - uc_search_path_init(&config.module_search_path); /* build uhttpd api table */ v = ucv_object_new(vm);