diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-03-25 18:04:59 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-03-25 19:07:59 +0100 |
commit | 00d941954366bb8db14f1ee7d272814a986e4262 (patch) | |
tree | 88b0f22385937daf12408250834c1171fd7effd9 /object.c | |
parent | 20a3763d0a9a5efe6478595fe5590d47bffa90fe (diff) |
vm: fix further memory leaks in trace mode
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -475,3 +475,19 @@ uc_ressource_prototype(json_object *jso) return type ? type->proto : NULL; } + + +#ifdef __GNUC__ + +__attribute__((destructor)) +static void uc_ressource_types_free(void) +{ + size_t i; + + for (i = 0; i < res_types.count; i++) + uc_value_put(res_types.entries[i].proto->header.jso); + + uc_vector_clear(&res_types); +} + +#endif |