From f3bb08bb1d94c77704371f8546a739119f0a05b4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 14:20:34 +0200 Subject: Merging upstream version 2.9.7. Signed-off-by: Daniel Baumann --- src/ssl_sample.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/ssl_sample.c') diff --git a/src/ssl_sample.c b/src/ssl_sample.c index 789637f..22b4072 100644 --- a/src/ssl_sample.c +++ b/src/ssl_sample.c @@ -251,7 +251,7 @@ static int sample_conv_aes_gcm_dec(const struct arg *arg_p, struct sample *smp, { struct sample nonce, key, aead_tag; struct buffer *smp_trash = NULL, *smp_trash_alloc = NULL; - EVP_CIPHER_CTX *ctx; + EVP_CIPHER_CTX *ctx = NULL; int dec_size, ret; smp_trash_alloc = alloc_trash_chunk(); @@ -350,11 +350,13 @@ static int sample_conv_aes_gcm_dec(const struct arg *arg_p, struct sample *smp, smp_dup(smp); free_trash_chunk(smp_trash_alloc); free_trash_chunk(smp_trash); + EVP_CIPHER_CTX_free(ctx); return 1; err: free_trash_chunk(smp_trash_alloc); free_trash_chunk(smp_trash); + EVP_CIPHER_CTX_free(ctx); return 0; } #endif @@ -1347,7 +1349,9 @@ smp_fetch_ssl_fc_ec(const struct arg *args, struct sample *smp, const char *kw, * different functional calls and to make it consistent while upgrading OpenSSL versions, * will convert the curve name returned by SSL_get0_group_name to upper case. */ - for (int i = 0; curve_name[i]; i++) + int i; + + for (i = 0; curve_name[i]; i++) curve_name[i] = toupper(curve_name[i]); } #else -- cgit v1.2.3