1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-09-18 01:33:00 +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
commit ea2c8f9861
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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