Free uc->mapped_blocks in uc_close

This commit is contained in:
Chris Eagle 2015-08-26 08:23:36 -07:00
parent 9023e77201
commit 5d8d251085

2
uc.c
View file

@ -283,6 +283,8 @@ uc_err uc_close(uch *handle)
uc->root->free(uc->root);
free(uc->hook_callbacks);
free(uc->memory_map);
// finally, free uc itself.
memset(uc, 0, sizeof(*uc));