diff options
author | Vitaly Chikunov <vt@altlinux.org> | 2019-02-02 19:39:57 +0300 |
---|---|---|
committer | Vitaly Chikunov <vt@altlinux.org> | 2019-02-02 20:29:47 +0300 |
commit | c8e12852242eca38b511f43f219b9dd69a38760e (patch) | |
tree | fba3ba2f35264e7a48188a59a7bdb78221427a65 /test_params.c | |
parent | d798e0186d61549dcbe74c3e83c4b2316e70bed7 (diff) | |
download | gost-engine-c8e12852242eca38b511f43f219b9dd69a38760e.zip gost-engine-c8e12852242eca38b511f43f219b9dd69a38760e.tar.gz gost-engine-c8e12852242eca38b511f43f219b9dd69a38760e.tar.bz2 |
Fix memory leaks in the tests
In preparation for memory leak detector fix them in the tests.
Diffstat (limited to 'test_params.c')
-rw-r--r-- | test_params.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test_params.c b/test_params.c index b847ad1..3e12d5a 100644 --- a/test_params.c +++ b/test_params.c @@ -949,6 +949,8 @@ static int test_cert(struct test_cert *tc) EVP_MD_CTX_free(md_ctx); ret |= err != 1; + X509_free(x); + OPENSSL_free(tbs); return ret; } @@ -1045,6 +1047,7 @@ static int test_param(struct test_param *t) printf(" EVP_PKEY_verify API\t\t"); T(EVP_PKEY_verify_init(ctx)); err = EVP_PKEY_verify(ctx, sig, siglen, t->hash, t->len); + EVP_PKEY_CTX_free(ctx); print_test_result(err); ret |= err != 1; @@ -1082,6 +1085,7 @@ static int test_param(struct test_param *t) } OPENSSL_free(sig); + EVP_PKEY_free(pkey); return ret; } |