From 631f00df1189550cca923c3d08885e6a7208d542 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 21 Sep 2021 20:17:00 +0200 Subject: main: fix leaking module name when processing -m flag Signed-off-by: Jo-Philipp Wich --- main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index dd992ac..834976d 100644 --- a/main.c +++ b/main.c @@ -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': -- cgit v1.2.3