From a066c48f55c6ebca1a9447835e8d13392df5b065 Mon Sep 17 00:00:00 2001 From: Hideki Miyazaki Date: Sat, 7 Aug 2021 11:13:41 +0900 Subject: [PATCH] fix jenkins failure --- src/internal.c | 2 +- tests/api.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/internal.c b/src/internal.c index 45b5dadb6..c5160dd6e 100644 --- a/src/internal.c +++ b/src/internal.c @@ -20555,7 +20555,7 @@ const char* GetCipherSegment(const WOLFSSL_CIPHER* cipher, char n[][MAX_SEGMENT_ offset = cipher->offset; if (offset >= (unsigned long)GetCipherNamesSize()) - return WOLFSSL_FAILURE; + return NULL; name = cipher_names[offset].name; diff --git a/tests/api.c b/tests/api.c index 94b4c4f74..b52cf85c1 100644 --- a/tests/api.c +++ b/tests/api.c @@ -46725,8 +46725,8 @@ static void test_SSL_CIPHER_get_xxx() const SSL_CIPHER* cipher = NULL; STACK_OF(SSL_CIPHER) *supportedCiphers = NULL; int i, numCiphers = 0; - SSL_CTX* ctx; - SSL* ssl; + SSL_CTX* ctx = NULL; + SSL* ssl = NULL; const char* testCertFile; const char* testKeyFile; char buf[256] = {0}; @@ -46845,8 +46845,10 @@ static void test_SSL_CIPHER_get_xxx() } } - SSL_CTX_free(ctx); - SSL_free(ssl); + if (ctx) + SSL_CTX_free(ctx); + if(ssl) + SSL_free(ssl); printf(resultFmt, passed); #endif