summaryrefslogtreecommitdiffhomepage
path: root/examples/native-function.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/native-function.c')
-rw-r--r--examples/native-function.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/native-function.c b/examples/native-function.c
index 5c2f6da..190c95c 100644
--- a/examples/native-function.c
+++ b/examples/native-function.c
@@ -77,6 +77,9 @@ int main(int argc, char **argv)
return 1;
}
+ /* initialize default module search path */
+ uc_search_path_init(&config.module_search_path);
+
/* initialize VM context */
uc_vm_t vm = { 0 };
uc_vm_init(&vm, &config);
@@ -103,5 +106,8 @@ int main(int argc, char **argv)
/* free VM context */
uc_vm_free(&vm);
+ /* free search module path vector */
+ uc_search_path_free(&config.module_search_path);
+
return exit_code;
}