pthread_spec: Zero initialize array

This commit is contained in:
TheTurtle 2024-10-28 01:26:01 +02:00 committed by IndecisiveTurtle
parent 93d7982117
commit 1318155ef3

View file

@ -102,7 +102,7 @@ int PS4_SYSV_ABI posix_pthread_setspecific(PthreadKeyT key, const void* value) {
Pthread* pthread = g_curthread;
if (!pthread->specific) {
pthread->specific = new PthreadSpecificElem[PthreadKeysMax];
pthread->specific = new PthreadSpecificElem[PthreadKeysMax]{};
if (!pthread->specific) {
return POSIX_ENOMEM;
}