mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-03 23:43:40 +00:00
Convey that it's ok for mbedtls_ssl_session_save to fail
mbedtls_ssl_session_save() always outputs the output length, even on error. Here, we're only calling it to get the needed output length, so it's ok to ignore the return value. Convey this to linters. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
73cb6f85a5
commit
a0e810de4b
@ -705,7 +705,7 @@ static int ssl_save_session_serialize(mbedtls_ssl_context *ssl,
|
||||
}
|
||||
|
||||
/* get size of the buffer needed */
|
||||
mbedtls_ssl_session_save(&exported_session, NULL, 0, session_data_len);
|
||||
(void) mbedtls_ssl_session_save(&exported_session, NULL, 0, session_data_len);
|
||||
*session_data = mbedtls_calloc(1, *session_data_len);
|
||||
if (*session_data == NULL) {
|
||||
mbedtls_printf(" failed\n ! alloc %u bytes for session data\n",
|
||||
|
Loading…
Reference in New Issue
Block a user