Fix a memory leak in ssl3_get_certificate_request.
Found by libFuzzer. Change-Id: Ifa343a184cc65f71fb6591d290b2d47d24a2be80 Reviewed-on: https://boringssl-review.googlesource.com/7456 Reviewed-by: Steven Valdez <svaldez@google.com> Reviewed-by: David Benjamin <davidben@google.com>
This commit is contained in:
parent
15c1488b61
commit
6b6e0b2089
@ -1411,6 +1411,7 @@ int ssl3_get_certificate_request(SSL *ssl) {
|
||||
OPENSSL_PUT_ERROR(SSL, ERR_R_MALLOC_FAILURE);
|
||||
goto err;
|
||||
}
|
||||
xn = NULL;
|
||||
}
|
||||
|
||||
/* we should setup a certificate to return.... */
|
||||
@ -1422,6 +1423,7 @@ int ssl3_get_certificate_request(SSL *ssl) {
|
||||
ret = 1;
|
||||
|
||||
err:
|
||||
X509_NAME_free(xn);
|
||||
sk_X509_NAME_pop_free(ca_sk, X509_NAME_free);
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user