mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-24 15:56:41 +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:
parent
09e04d6378
commit
0355591445
@ -450,7 +450,12 @@ Thread_base::~Thread_base()
|
||||
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;
|
||||
|
||||
/* inform core about the killed thread */
|
||||
|
Loading…
Reference in New Issue
Block a user