[wasm-api] Clear structs in _free()

This commit is contained in:
Behdad Esfahbod 2023-02-23 15:17:18 -07:00
parent 099a0150e1
commit af1f41a43e
2 changed files with 7 additions and 0 deletions

View File

@ -40,6 +40,9 @@ blob_free (HB_WASM_EXEC_ENV
return;
module_free (blob->data);
blob->data = nullref;
blob->length = 0;
}

View File

@ -43,6 +43,10 @@ buffer_contents_free (HB_WASM_EXEC_ENV
module_free (contents->info);
module_free (contents->pos);
contents->info = nullref;
contents->pos = nullref;
contents->length = 0;
}
void