forked from wolfSSL/wolfssl
Fix for CID 299847 memory leak on error case
This commit is contained in:
@@ -1549,11 +1549,13 @@ int wolfSSL_X509V3_EXT_print(WOLFSSL_BIO *out, WOLFSSL_X509_EXTENSION *ext,
|
|||||||
if ((valLen = XSNPRINTF(val, len, "%*s%s,",
|
if ((valLen = XSNPRINTF(val, len, "%*s%s,",
|
||||||
indent, "", str->strData))
|
indent, "", str->strData))
|
||||||
>= len)
|
>= len)
|
||||||
|
XFREE(val, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
return rc;
|
return rc;
|
||||||
} else {
|
} else {
|
||||||
if ((valLen = XSNPRINTF(val, len, "%*s%s",
|
if ((valLen = XSNPRINTF(val, len, "%*s%s",
|
||||||
indent, "", str->strData))
|
indent, "", str->strData))
|
||||||
>= len)
|
>= len)
|
||||||
|
XFREE(val, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
if (tmpLen + valLen > tmpSz) {
|
if (tmpLen + valLen > tmpSz) {
|
||||||
|
Reference in New Issue
Block a user