From 712443529fe06079170bae8abaae1eb825169162 Mon Sep 17 00:00:00 2001 From: tedu <> Date: Wed, 9 Jul 2014 20:34:29 +0000 Subject: 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. --- src/lib/libcrypto/ocsp/ocsp_lib.c | 5 ++++- src/lib/libssl/src/crypto/ocsp/ocsp_lib.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/libcrypto/ocsp/ocsp_lib.c b/src/lib/libcrypto/ocsp/ocsp_lib.c index b55e509586..d32f063209 100644 --- a/src/lib/libcrypto/ocsp/ocsp_lib.c +++ b/src/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 for the OpenSSL * project. */ @@ -265,6 +265,9 @@ err: free(*ppath); free(*pport); free(*phost); + *phost = NULL; + *pport = NULL; + *ppath = NULL; return 0; } diff --git a/src/lib/libssl/src/crypto/ocsp/ocsp_lib.c b/src/lib/libssl/src/crypto/ocsp/ocsp_lib.c index b55e509586..d32f063209 100644 --- a/src/lib/libssl/src/crypto/ocsp/ocsp_lib.c +++ b/src/lib/libssl/src/crypto/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 for the OpenSSL * project. */ @@ -265,6 +265,9 @@ err: free(*ppath); free(*pport); free(*phost); + *phost = NULL; + *pport = NULL; + *ppath = NULL; return 0; } -- cgit v1.2.3-55-g6feb