Check for NULL

This commit is contained in:
Tesfa Mael
2020-11-09 08:45:48 -08:00
parent 937a7ce8ce
commit a5caf1be01

View File

@@ -4307,11 +4307,13 @@ Signer* GetCA(void* vp, byte* hash)
WOLFSSL_CERT_MANAGER* cm = (WOLFSSL_CERT_MANAGER*)vp;
Signer* ret = NULL;
Signer* signers;
word32 row = HashSigner(hash);
word32 row = 0;
if (cm == NULL)
if (cm == NULL || hash == NULL)
return NULL;
row = HashSigner(hash);
if (wc_LockMutex(&cm->caLock) != 0)
return ret;