From a9581d2d5f83ef6b8d984ca997055b5310746911 Mon Sep 17 00:00:00 2001 From: Xiaokang Qian Date: Mon, 11 Dec 2023 01:50:34 +0000 Subject: [PATCH] Fix CI failure of uninitialized fp Signed-off-by: Xiaokang Qian --- programs/ssl/ssl_client2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c index d2f47ff06..1b3dedb22 100644 --- a/programs/ssl/ssl_client2.c +++ b/programs/ssl/ssl_client2.c @@ -742,6 +742,10 @@ int main(int argc, char *argv[]) size_t cid_renego_len = 0; #endif +#if defined(MBEDTLS_SSL_EARLY_DATA) + FILE *early_data_fp = NULL; +#endif /* MBEDTLS_SSL_EARLY_DATA */ + #if defined(MBEDTLS_SSL_ALPN) const char *alpn_list[ALPN_LIST_SIZE]; #endif @@ -1965,7 +1969,6 @@ usage: #if defined(MBEDTLS_SSL_EARLY_DATA) int early_data_enabled = MBEDTLS_SSL_EARLY_DATA_DISABLED; - FILE *early_data_fp = NULL; if (strlen(opt.early_data) > 0) { if ((early_data_fp = fopen(opt.early_data, "rb")) == NULL) { mbedtls_printf("failed\n ! Cannot open '%s' for reading.\n",