diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-10-02 21:20:47 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-10-02 21:20:47 +0200 |
commit | 1e4c6f566543ed245253421cbe003b7b22563e2e (patch) | |
tree | b2c6375b8872361da87895520ee67cc6414b26d8 /eval.c | |
parent | 00c2c35a7204a41ce8d76ee80dc877746a87af5d (diff) |
eval: free previous exception when storing a new one
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -49,6 +49,9 @@ ut_exception(struct ut_state *state, uint32_t off, const char *fmt, ...) json_object_set_userdata(msg, exception_tag, NULL); + if (state->error.code == UT_ERROR_EXCEPTION) + json_object_put(state->error.info.exception); + state->error.code = UT_ERROR_EXCEPTION; state->error.info.exception = msg; |