From 99d46d9a6d56868ac2eefe5d8fbe325ab9873e91 Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Mon, 16 Oct 2023 13:36:24 -0600 Subject: [PATCH] fix for derefernce warning CID 327296 & CID 327298 --- src/ssl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ssl.c b/src/ssl.c index 25568c76a..071cae3b1 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -7997,8 +7997,8 @@ int wolfSSL_SetOCSP_Cb(WOLFSSL* ssl, CbOCSPIO ioCb, CbOCSPRespFree respFreeCb, void* ioCbCtx) { WOLFSSL_ENTER("wolfSSL_SetOCSP_Cb"); - SSL_CM_WARNING(ssl); if (ssl) { + SSL_CM_WARNING(ssl); ssl->ocspIOCtx = ioCbCtx; /* use SSL specific ioCbCtx */ return wolfSSL_CertManagerSetOCSP_Cb(SSL_CM(ssl), ioCb, respFreeCb, NULL); @@ -8589,9 +8589,10 @@ int wolfSSL_trust_peer_cert(WOLFSSL* ssl, const char* file, int type) int wolfSSL_EnableCRL(WOLFSSL* ssl, int options) { WOLFSSL_ENTER("wolfSSL_EnableCRL"); - SSL_CM_WARNING(ssl); - if (ssl) + if (ssl) { + SSL_CM_WARNING(ssl); return wolfSSL_CertManagerEnableCRL(SSL_CM(ssl), options); + } else return BAD_FUNC_ARG; }