From d23bdd73a33012772a0e5f5f400ae7cbd5cd16bf Mon Sep 17 00:00:00 2001 From: tb Date: Sat, 4 Dec 2021 09:04:36 +0000 Subject: [PATCH] Free cert, key and ocsp_staple on exit of do_keypair_test(). Reported by Ilya Shipitsine, discussed with jsing --- regress/lib/libtls/keypair/keypairtest.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 * @@ -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); } -- 2.20.1