mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-19 07:38:28 +00:00
lx_hybrid: Safety check when freeing thread
Try to free the metadata of a thread only if created by Genode. The code did not cause any actual problems. I just stumbled over the inconsistency while reviewing the code.
This commit is contained in:
@ -450,7 +450,12 @@ Thread_base::~Thread_base()
|
|||||||
ret, errno);
|
ret, errno);
|
||||||
}
|
}
|
||||||
|
|
||||||
destroy(env()->heap(), _tid.meta_data);
|
Thread_meta_data_created *meta_data =
|
||||||
|
dynamic_cast<Thread_meta_data_created *>(_tid.meta_data);
|
||||||
|
|
||||||
|
if (meta_data)
|
||||||
|
destroy(env()->heap(), meta_data);
|
||||||
|
|
||||||
_tid.meta_data = 0;
|
_tid.meta_data = 0;
|
||||||
|
|
||||||
/* inform core about the killed thread */
|
/* inform core about the killed thread */
|
||||||
|
Reference in New Issue
Block a user