diff options
author | Jim Basney <jbasney@illinois.edu> | 2016-03-09 17:11:49 -0600 |
---|---|---|
committer | Rich Salz <rsalz@akamai.com> | 2016-03-09 20:44:52 -0500 |
commit | dca7158c954679757e216a0179f9014f86f6ed44 (patch) | |
tree | 3e348a3fc0eb315102a0d20d148fe711b9af0110 /crypto | |
parent | 642565106e7764cecf96cf865bd6c52afaa68f22 (diff) |
Avoid double-free in calleres to OCSP_parse_url
set pointers to NULL after OPENSSL_free before returning to caller to
avoid possible double-free in caller
Signed-off-by: Rich Salz <rsalz@akamai.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/ocsp/ocsp_lib.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/ocsp/ocsp_lib.c b/crypto/ocsp/ocsp_lib.c index 1aaa290a4a..8814190146 100644 --- a/crypto/ocsp/ocsp_lib.c +++ b/crypto/ocsp/ocsp_lib.c @@ -266,8 +266,11 @@ int OCSP_parse_url(const char *url, char **phost, char **pport, char **ppath, err: OPENSSL_free(buf); OPENSSL_free(*ppath); + *ppath = NULL; OPENSSL_free(*pport); + *pport = NULL; OPENSSL_free(*phost); + *phost = NULL; return 0; } |