summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-09-20 20:48:42 +0200
committerJo-Philipp Wich <jo@mein.io>2020-09-20 20:48:42 +0200
commit40d4b5ca27e73c697363b805d0e1fde85276b46e (patch)
tree5ec108c12ca255c5edbe098f35f7849d896ea30c
parent4410e14919de62ca8af35194b8a1ecfe74c5c624 (diff)
ast: fix context value leak
Free any remaining context value when freeing the runtime state. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--ast.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ast.c b/ast.c
index cb6f438..498f40e 100644
--- a/ast.c
+++ b/ast.c
@@ -273,6 +273,8 @@ ut_free(struct ut_state *s)
size_t n;
if (s) {
+ json_object_put(s->ctx);
+
while (s->stack.off > 0)
json_object_put(s->stack.scope[--s->stack.off]);