summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2021-04-04 19:36:09 +0000
committertb <>2021-04-04 19:36:09 +0000
commit3864ff3c511091b029b8af437d357ed6ee2c3c6e (patch)
tree54e800c5642c6c0d627c7ee12ea14dd399f87460 /src
parent8cdcd3f73909eb981de314d4a3392234b0955731 (diff)
downloadopenbsd-3864ff3c511091b029b8af437d357ed6ee2c3c6e.tar.gz
openbsd-3864ff3c511091b029b8af437d357ed6ee2c3c6e.tar.bz2
openbsd-3864ff3c511091b029b8af437d357ed6ee2c3c6e.zip
Explicitly NULL pointers to avoid a double free.
Diffstat (limited to 'src')
-rw-r--r--src/regress/lib/libcrypto/bn/mont/mont.c4
1 files changed, 3 insertions, 1 deletions
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 @@
1/* $OpenBSD: mont.c,v 1.3 2021/04/04 19:32:26 tb Exp $ */ 1/* $OpenBSD: mont.c,v 1.4 2021/04/04 19:36:09 tb Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2014 Miodrag Vallat. 4 * Copyright (c) 2014 Miodrag Vallat.
@@ -63,7 +63,9 @@ main(int argc, char *argv[])
63 goto err; 63 goto err;
64 64
65 free(key); 65 free(key);
66 key = NULL;
66 DH_free(dh); 67 DH_free(dh);
68 dh = NULL;
67 } 69 }
68 70
69 return 0; 71 return 0;