diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-09-21 20:17:00 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-09-21 20:25:46 +0200 |
commit | 631f00df1189550cca923c3d08885e6a7208d542 (patch) | |
tree | 5d5b70dd7bb953c3c26f56b7a1d9dfcfa104b59d /main.c | |
parent | e55188bb8bba50e7518a7d95c680cc46607eb24f (diff) |
main: fix leaking module name when processing -m flag
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -331,11 +331,14 @@ main(int argc, char **argv) break; case 'm': - o = uc_vm_invoke(&vm, "require", 1, ucv_string_new(optarg)); + p = ucv_string_new(optarg); + o = uc_vm_invoke(&vm, "require", 1, p); if (o) register_variable(uc_vm_scope_get(&vm), optarg, o); + ucv_put(p); + break; case 't': |