summaryrefslogtreecommitdiffstats
path: root/src/ssl_sample.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:20:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:20:30 +0000
commitddfc40eabdbc59a607b568e946fb116dcd3439fd (patch)
treeb3253de65399448dbbf12e5b65d2da56c53d3af6 /src/ssl_sample.c
parentAdding upstream version 2.9.6. (diff)
downloadhaproxy-ddfc40eabdbc59a607b568e946fb116dcd3439fd.tar.xz
haproxy-ddfc40eabdbc59a607b568e946fb116dcd3439fd.zip
Adding upstream version 2.9.7.upstream/2.9.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/ssl_sample.c')
-rw-r--r--src/ssl_sample.c8
1 files changed, 6 insertions, 2 deletions
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