diff --git a/src/hb-wasm-api-blob.hh b/src/hb-wasm-api-blob.hh index e9aff8968..fbff0ff1f 100644 --- a/src/hb-wasm-api-blob.hh +++ b/src/hb-wasm-api-blob.hh @@ -40,6 +40,9 @@ blob_free (HB_WASM_EXEC_ENV return; module_free (blob->data); + + blob->data = nullref; + blob->length = 0; } diff --git a/src/hb-wasm-api-buffer.hh b/src/hb-wasm-api-buffer.hh index 949195167..07d7ab418 100644 --- a/src/hb-wasm-api-buffer.hh +++ b/src/hb-wasm-api-buffer.hh @@ -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