summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2021-12-04 09:04:37 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2021-12-04 09:04:37 +0000
commit3a26c6f97ef6191e341627ce667f381c205a6f0e (patch)
tree27496361ed6f8c62170a0f72b3ddf709df2fa737
parent726df78198a36d630dfbdf2c00712f9886c134c1 (diff)
Free cert, key and ocsp_staple on exit of do_keypair_test().
Reported by Ilya Shipitsine, discussed with jsing
-rw-r--r--regress/lib/libtls/keypair/keypairtest.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/regress/lib/libtls/keypair/keypairtest.c b/regress/lib/libtls/keypair/keypairtest.c
index 732464af00e..0aa1877389e 100644
--- a/regress/lib/libtls/keypair/keypairtest.c
+++ b/regress/lib/libtls/keypair/keypairtest.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: keypairtest.c,v 1.4 2018/04/07 16:42:17 jsing Exp $ */
+/* $OpenBSD: keypairtest.c,v 1.5 2021/12/04 09:04:36 tb Exp $ */
/*
* Copyright (c) 2018 Joel Sing <jsing@openbsd.org>
*
@@ -186,6 +186,9 @@ do_keypair_tests(void)
done:
X509_free(x509_cert);
free(hash);
+ free((uint8_t *)cert);
+ free((uint8_t *)key);
+ free((uint8_t *)ocsp_staple);
return (failed);
}