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:
@@ -266,8 +266,11 @@ int OCSP_parse_url(const char *url, char **phost, char **pport, char **ppath,
|
|||||||
err:
|
err:
|
||||||
OPENSSL_free(buf);
|
OPENSSL_free(buf);
|
||||||
OPENSSL_free(*ppath);
|
OPENSSL_free(*ppath);
|
||||||
|
*ppath = NULL;
|
||||||
OPENSSL_free(*pport);
|
OPENSSL_free(*pport);
|
||||||
|
*pport = NULL;
|
||||||
OPENSSL_free(*phost);
|
OPENSSL_free(*phost);
|
||||||
|
*phost = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user