summaryrefslogtreecommitdiff
path: root/regress/lib
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2021-04-04 19:36:10 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2021-04-04 19:36:10 +0000
commita64146f1b2cadde6dacf0ea87a7006fd7a64b28f (patch)
tree92194f2e6c5cb83011596951e0bf3240a1a9359d /regress/lib
parente86ee65bc38f3d6e08667201108cb79b0e3b6447 (diff)
Explicitly NULL pointers to avoid a double free.
Diffstat (limited to 'regress/lib')
-rw-r--r--regress/lib/libcrypto/bn/mont/mont.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/regress/lib/libcrypto/bn/mont/mont.c b/regress/lib/libcrypto/bn/mont/mont.c
index 83d56e53757..54626b5c38a 100644
--- a/regress/lib/libcrypto/bn/mont/mont.c
+++ b/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;