diff options
author | Jo-Philipp Wich <jo@mein.io> | 2022-01-28 23:58:46 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2022-01-29 23:33:07 +0100 |
commit | 1094ffa276990fd53abe633e5b14869d7c538a16 (patch) | |
tree | 96bd5908ea5ad1ba81ecb0915ab8059970f09775 /lib.c | |
parent | ddc5aa7cd3121300f2ba6e68cb038258a616d4e4 (diff) |
lib: fix memory leak in uc_require_ucode()
We need to release the compiled module function after we executed it in
our VM context.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1558,6 +1558,7 @@ uc_require_ucode(uc_vm_t *vm, const char *path, uc_value_t *scope, uc_value_t ** *res = uc_vm_stack_pop(vm); uc_source_put(source); + ucv_put(&function->header); return true; } |