From a876585f0004e84f553d78c213d00be1a3c9fa92 Mon Sep 17 00:00:00 2001 From: job Date: Wed, 26 Apr 2023 21:30:12 +0000 Subject: [PATCH] Clean up X509 memory before exit --- regress/lib/libcrypto/x509/x509_asn1.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/regress/lib/libcrypto/x509/x509_asn1.c b/regress/lib/libcrypto/x509/x509_asn1.c index f41b26f7d86..b6b251f1047 100644 --- a/regress/lib/libcrypto/x509/x509_asn1.c +++ b/regress/lib/libcrypto/x509/x509_asn1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_asn1.c,v 1.7 2023/04/26 19:05:37 job Exp $ */ +/* $OpenBSD: x509_asn1.c,v 1.8 2023/04/26 21:30:12 job Exp $ */ /* * Copyright (c) 2023 Job Snijders * @@ -229,6 +229,9 @@ main(void) ret += x509_compare("X509_set_pubkey", a, der2, der2sz); x509_cleanup(&a, &der2); + X509_free(x); + free(der); + if (ret) return 1; return 0; -- 2.20.1