add missing deallocate_small thread_seal_metadata

pull/65/head
Daniel Micay 2018-10-28 23:23:54 -04:00
parent 5bee717134
commit a02f4ebb19
1 changed files with 2 additions and 0 deletions

View File

@ -1245,6 +1245,7 @@ EXPORT void h_free(void *p) {
if (p >= ro.slab_region_start && p < ro.slab_region_end) { if (p >= ro.slab_region_start && p < ro.slab_region_end) {
thread_unseal_metadata(); thread_unseal_metadata();
deallocate_small(p, NULL); deallocate_small(p, NULL);
thread_seal_metadata();
return; return;
} }
@ -1264,6 +1265,7 @@ EXPORT void h_free_sized(void *p, size_t expected_size) {
thread_unseal_metadata(); thread_unseal_metadata();
expected_size = get_size_info(adjust_size_for_canaries(expected_size)).size; expected_size = get_size_info(adjust_size_for_canaries(expected_size)).size;
deallocate_small(p, &expected_size); deallocate_small(p, &expected_size);
thread_seal_metadata();
return; return;
} }