Fix for CID 299847 memory leak on error case

This commit is contained in:
JacobBarthelmeh
2023-10-27 14:17:31 -06:00
parent 7b20a5597c
commit 8760ad9473

View File

@@ -1549,11 +1549,13 @@ int wolfSSL_X509V3_EXT_print(WOLFSSL_BIO *out, WOLFSSL_X509_EXTENSION *ext,
if ((valLen = XSNPRINTF(val, len, "%*s%s,",
indent, "", str->strData))
>= len)
XFREE(val, NULL, DYNAMIC_TYPE_TMP_BUFFER);
return rc;
} else {
if ((valLen = XSNPRINTF(val, len, "%*s%s",
indent, "", str->strData))
>= len)
XFREE(val, NULL, DYNAMIC_TYPE_TMP_BUFFER);
return rc;
}
if (tmpLen + valLen > tmpSz) {