From 64696dfeb942a5a4a8aa054f0eb1d408c8f70f98 Mon Sep 17 00:00:00 2001 From: tb <> Date: Sun, 4 Apr 2021 19:36:09 +0000 Subject: Explicitly NULL pointers to avoid a double free. --- src/regress/lib/libcrypto/bn/mont/mont.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/regress/lib/libcrypto/bn/mont/mont.c b/src/regress/lib/libcrypto/bn/mont/mont.c index 83d56e5375..54626b5c38 100644 --- a/src/regress/lib/libcrypto/bn/mont/mont.c +++ b/src/regress/lib/libcrypto/bn/mont/mont.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mont.c,v 1.3 2021/04/04 19:32:26 tb Exp $ */ +/* $OpenBSD: mont.c,v 1.4 2021/04/04 19:36:09 tb Exp $ */ /* * Copyright (c) 2014 Miodrag Vallat. @@ -63,7 +63,9 @@ main(int argc, char *argv[]) goto err; free(key); + key = NULL; DH_free(dh); + dh = NULL; } return 0; -- cgit v1.2.3-55-g6feb