1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-07-06 15:54:57 +03:00

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

This commit is contained in:
Davide Beatrici
2021-02-21 14:10:08 +01:00
committed by GitHub

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);