diff options
author | Russell Webb <russell.webb@intel.com> | 2015-06-13 10:35:55 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-06-23 08:04:19 -0400 |
commit | 295c629ab1676647c53166db96657e1fccad1508 (patch) | |
tree | 5c8a98a5692276dc6d8109fdcca08fe060cac9d9 /crypto/hmac | |
parent | c61bb1abafaaa90a475fb0be87bdde1a21b7677b (diff) |
RT3856: Fix memory leaks in test code
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 2d540402aac7a05af9c99b58864d53c0201a0b42)
Diffstat (limited to 'crypto/hmac')
-rw-r--r-- | crypto/hmac/hmactest.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/hmac/hmactest.c b/crypto/hmac/hmactest.c index 271d0ebf26..5a573950a4 100644 --- a/crypto/hmac/hmactest.c +++ b/crypto/hmac/hmactest.c @@ -195,6 +195,7 @@ int main(int argc, char *argv[]) } printf("test 4 ok\n"); test5: + HMAC_CTX_cleanup(&ctx); HMAC_CTX_init(&ctx); if (HMAC_Init_ex(&ctx, test[4].key, test[4].key_len, NULL, NULL)) { printf("Should fail to initialise HMAC with empty MD (test 5)\n"); @@ -284,6 +285,7 @@ test5: printf("test 5 ok\n"); } test6: + HMAC_CTX_cleanup(&ctx); HMAC_CTX_init(&ctx); if (!HMAC_Init_ex(&ctx, test[7].key, test[7].key_len, EVP_sha1(), NULL)) { printf("Failed to initialise HMAC (test 6)\n"); @@ -314,6 +316,7 @@ test6: printf("test 6 ok\n"); } end: + HMAC_CTX_cleanup(&ctx); EXIT(err); return (0); } |