summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-09-20 21:45:35 +0200
committerJo-Philipp Wich <jo@mein.io>2020-09-20 21:45:35 +0200
commit890110a8072766d1e659f2c034d64753b0f1e66d (patch)
tree91ef94bb0bb8566651f0687e50aca476359a4f79
parent40d4b5ca27e73c697363b805d0e1fde85276b46e (diff)
eval: fix double free of env values
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index c8a5910..54b51db 100644
--- a/eval.c
+++ b/eval.c
@@ -1583,7 +1583,7 @@ ut_run(struct ut_state *state, struct json_object *env, struct json_object *modu
if (env) {
json_object_object_foreach(env, key, val)
- ut_register_variable(scope, key, val);
+ ut_register_variable(scope, key, json_object_get(val));
}
ut_globals_init(state, scope);