summaryrefslogtreecommitdiff
path: root/lib/libcrypto/ocsp
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2014-07-09 20:34:30 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2014-07-09 20:34:30 +0000
commit3fe81a8154c8dbfc402f9e330c634c52df3b5b79 (patch)
tree1a8e2841a657195e20794aac5510ff06d3c41be1 /lib/libcrypto/ocsp
parent4a10caa10de3797648b19c4e9404b6b4c8f5cbd8 (diff)
reset host, port, path to null after freeing so the caller doesn't
accidentally free them again. actually a bug in the caller and (hey hey) apps/ocsp.c has exactly that bug, but it's easier/safer to fix here.
Diffstat (limited to 'lib/libcrypto/ocsp')
-rw-r--r--lib/libcrypto/ocsp/ocsp_lib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libcrypto/ocsp/ocsp_lib.c b/lib/libcrypto/ocsp/ocsp_lib.c
index b55e509586d..d32f0632098 100644
--- a/lib/libcrypto/ocsp/ocsp_lib.c
+++ b/lib/libcrypto/ocsp/ocsp_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ocsp_lib.c,v 1.10 2014/06/12 15:49:30 deraadt Exp $ */
+/* $OpenBSD: ocsp_lib.c,v 1.11 2014/07/09 20:34:29 tedu Exp $ */
/* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL
* project. */
@@ -265,6 +265,9 @@ err:
free(*ppath);
free(*pport);
free(*phost);
+ *phost = NULL;
+ *pport = NULL;
+ *ppath = NULL;
return 0;
}