mirror of
https://github.com/openssl/openssl.git
synced 2025-02-11 14:22:43 +08:00
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>
This commit is contained in:
parent
642565106e
commit
dca7158c95
@ -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;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user