summaryrefslogtreecommitdiffstats
path: root/src/ssl_sample.c
diff options
context:
space:
mode:
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