RT3682: Avoid double-free on OCSP parse error

Found by Kurt Cancemi.

Reviewed-by: Matt Caswell <matt@openssl.org>
This commit is contained in:
Rich Salz 2015-06-13 09:29:10 -04:00 committed by Rich Salz
parent 2d540402aa
commit 4b8d8e2ad3

View file

@ -275,6 +275,7 @@ int ocsp_main(int argc, char **argv)
OPENSSL_free(thost);
OPENSSL_free(tport);
OPENSSL_free(tpath);
thost = tport = tpath = NULL;
if (!OCSP_parse_url(opt_arg(), &host, &port, &path, &use_ssl)) {
BIO_printf(bio_err, "%s Error parsing URL\n", prog);
goto end;