Merge PR #1273: fix null pointer dereference found by ErrorSanitizer

This commit is contained in:
Davide Beatrici authored and GitHub committed 2021-02-21 14:10:08 +01:00
commit ea2c8f9861
1 file changed
+4
+4
View File
@@ -1840,6 +1840,10 @@ LOCK *UnixNewLock()
// Create a mutex
mutex = UnixMemoryAlloc(sizeof(pthread_mutex_t));
if (mutex == NULL)
{
return NULL;
}
// Initialization of the mutex
pthread_mutex_init(mutex, NULL);