Fix for possible ret may be used uninitialized.

This commit is contained in:
David Garske
2021-11-08 11:05:59 -08:00
parent df82b01e68
commit eebed0cc1c

View File

@ -2595,6 +2595,7 @@ static int SetupKeys(const byte* input, int* sslBytes, SnifferSession* session,
} }
#endif #endif
ret = 0;
#ifdef WOLFSSL_SNIFFER_KEY_CALLBACK #ifdef WOLFSSL_SNIFFER_KEY_CALLBACK
if (KeyCb != NULL && ksInfo) { if (KeyCb != NULL && ksInfo) {
if (keyBuf == NULL) { if (keyBuf == NULL) {
@ -2701,6 +2702,7 @@ static int SetupKeys(const byte* input, int* sslBytes, SnifferSession* session,
} }
#endif #endif
ret = 0;
#ifdef WOLFSSL_SNIFFER_KEY_CALLBACK #ifdef WOLFSSL_SNIFFER_KEY_CALLBACK
if (KeyCb != NULL && ksInfo) { if (KeyCb != NULL && ksInfo) {
if (keyBuf == NULL) { if (keyBuf == NULL) {