2
0
mirror of https://github.com/boostorg/thread.git synced 2026-02-09 23:42:18 +00:00

fix memory leak.

This commit is contained in:
Vicente J. Botet Escriba
2016-04-20 23:50:43 +02:00
parent 55a1325f30
commit daae305bf7
2 changed files with 6 additions and 1 deletions

View File

@@ -53,6 +53,9 @@ namespace boost
{
if(memcmp(&epoch_tss_key_flag, &pthread_once_init_value, sizeof(pthread_once_t)))
{
void* data = (void*)pthread_getspecific(epoch_tss_key);
if (data)
delete_epoch_tss_data(data);
pthread_key_delete(epoch_tss_key);
}
}