diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-10-06 14:14:30 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-10-06 15:02:28 +0200 |
commit | 95b9a70d57e05e30a92183921c2c8e8472d56dd8 (patch) | |
tree | ada21be7bc7f42af66bca4938ec3988c3d6f35d3 /ast.c | |
parent | bae96955c502350a6ec90e47b60e1f5d7f460477 (diff) |
ast: fix refcount imbalance when releasing scopes
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'ast.c')
-rw-r--r-- | ast.c | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -381,15 +381,8 @@ ut_release_scope(struct ut_scope *sc) sc->refs--; - if (sc->refs == 0) { + if (sc->refs == 0) json_object_put(sc->scope); - sc->scope = NULL; - - if (sc->parent) { - ut_release_scope(json_object_get_userdata(sc->parent)); - sc->parent = NULL; - } - } } struct ut_scope * |