mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Do not direclty return but goto exit label for cleanup of allocated resources in case ALPN selection or SNI callback fails.
This commit is contained in:
@ -5863,7 +5863,7 @@ int DoTls13ClientHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
|||||||
|
|
||||||
#ifdef HAVE_SNI
|
#ifdef HAVE_SNI
|
||||||
if ((ret = SNI_Callback(ssl)) != 0)
|
if ((ret = SNI_Callback(ssl)) != 0)
|
||||||
return ret;
|
goto exit_dch;
|
||||||
ssl->options.side = WOLFSSL_SERVER_END;
|
ssl->options.side = WOLFSSL_SERVER_END;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -5954,7 +5954,7 @@ int DoTls13ClientHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
|||||||
/* With PSK and all other things validated, it's time to
|
/* With PSK and all other things validated, it's time to
|
||||||
* select the ALPN protocol, if so requested */
|
* select the ALPN protocol, if so requested */
|
||||||
if ((ret = ALPN_Select(ssl)) != 0)
|
if ((ret = ALPN_Select(ssl)) != 0)
|
||||||
return ret;
|
goto exit_dch;
|
||||||
#endif
|
#endif
|
||||||
/* Advance state and proceed */
|
/* Advance state and proceed */
|
||||||
ssl->options.asyncState = TLS_ASYNC_BUILD;
|
ssl->options.asyncState = TLS_ASYNC_BUILD;
|
||||||
|
Reference in New Issue
Block a user