td->memid will be cleared by _mi_memzero_aligned before the function returns. So that td will not be correctly freed in mi_thread_data_free.
td->memid will be cleared by _mi_memzero_aligned before the function returns. So that td will not be correctly freed in mi_thread_data_free.