Author: jfclere Date: Mon Nov 12 12:36:40 2018 New Revision: 1846408 URL: http://svn.apache.org/viewvc?rev=1846408&view=rev Log: Free the response in the place where it is allocated.
Modified: tomcat/native/trunk/native/src/sslutils.c Modified: tomcat/native/trunk/native/src/sslutils.c URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/sslutils.c?rev=1846408&r1=1846407&r2=1846408&view=diff ============================================================================== --- tomcat/native/trunk/native/src/sslutils.c (original) +++ tomcat/native/trunk/native/src/sslutils.c Mon Nov 12 12:36:40 2018 @@ -1034,14 +1034,12 @@ static int process_ocsp_response(OCSP_RE r = OCSP_response_status(ocsp_resp); if (r != OCSP_RESPONSE_STATUS_SUCCESSFUL) { - OCSP_RESPONSE_free(ocsp_resp); return OCSP_STATUS_UNKNOWN; } bs = OCSP_response_get1_basic(ocsp_resp); certid = OCSP_cert_to_id(NULL, cert, issuer); if (certid == NULL) { - OCSP_RESPONSE_free(ocsp_resp); return OCSP_STATUS_UNKNOWN; } ss = OCSP_resp_get0(bs, OCSP_resp_find(bs, certid, -1)); /* find by serial number and get the matching response */ @@ -1057,7 +1055,6 @@ static int process_ocsp_response(OCSP_RE /* we clean up */ OCSP_CERTID_free(certid); - OCSP_RESPONSE_free(ocsp_resp); return o; } @@ -1096,6 +1093,7 @@ static int ssl_ocsp_request(X509 *cert, } if (resp != NULL) { + OCSP_RESPONSE_free(resp); apr_pool_destroy(p); return rv; } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org