Skip to content

Commit ccd5945

Browse files
authored
Merge pull request #1942 from martin-frbg/issue1720
Delete the pthread key on cleanup in TLS mode
2 parents 9f80e0f + bba1e67 commit ccd5945

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

driver/others/memory.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,6 +1073,11 @@ static volatile int memory_initialized = 0;
10731073
}
10741074
free(table);
10751075
}
1076+
#if defined(OS_WINDOWS)
1077+
TlsFree(local_storage_key);
1078+
#else
1079+
pthread_key_delete(local_storage_key);
1080+
#endif
10761081
}
10771082

10781083
static void blas_memory_init(){

0 commit comments

Comments
 (0)