F-6549: free the DER buffer on the NewByteArray failure path in X509_REQ_get_der

pull/400/head
Chris Conlon 2026-08-13 16:07:45 -06:00
parent e5b065fc07
commit 7ed8a1a77f
1 changed files with 1 additions and 0 deletions

View File

@ -509,6 +509,7 @@ JNIEXPORT jbyteArray JNICALL Java_com_wolfssl_WolfSSLCertRequest_X509_1REQ_1get_
if (derArr == NULL) {
throwWolfSSLJNIException(jenv,
"Failed to create byte array in native X509_REQ_get_der");
XFREE(der, NULL, DYNAMIC_TYPE_OPENSSL);
return NULL;
}