Skip to content

Commit 4b1f575

Browse files
Code review feedback.
1 parent 8ed1f2c commit 4b1f575

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

src/ssl.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8472,13 +8472,6 @@ WOLFSSL_CTX* wolfSSL_set_SSL_CTX(WOLFSSL* ssl, WOLFSSL_CTX* ctx)
84728472
if (ssl->ctx == ctx)
84738473
return ssl->ctx;
84748474

8475-
if (ctx->suites == NULL) {
8476-
/* suites */
8477-
if (AllocateCtxSuites(ctx) != 0)
8478-
return NULL;
8479-
InitSSL_CTX_Suites(ctx);
8480-
}
8481-
84828475
wolfSSL_RefWithMutexInc(&ctx->ref, &ret);
84838476
#ifdef WOLFSSL_REFCNT_ERROR_RETURN
84848477
if (ret != 0) {
@@ -8489,6 +8482,14 @@ WOLFSSL_CTX* wolfSSL_set_SSL_CTX(WOLFSSL* ssl, WOLFSSL_CTX* ctx)
84898482
#else
84908483
(void)ret;
84918484
#endif
8485+
8486+
if (ctx->suites == NULL) {
8487+
/* suites */
8488+
if (AllocateCtxSuites(ctx) != 0)
8489+
return NULL;
8490+
InitSSL_CTX_Suites(ctx);
8491+
}
8492+
84928493
if (ssl->ctx != NULL)
84938494
wolfSSL_CTX_free(ssl->ctx);
84948495
ssl->ctx = ctx;

0 commit comments

Comments
 (0)