mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Fix i2d_RSAPublicKey() memory leak issue.
This commit is contained in:
@ -28484,6 +28484,9 @@ int wolfSSL_i2d_RSAPublicKey(WOLFSSL_RSA *rsa, const unsigned char **pp)
|
|||||||
}
|
}
|
||||||
if((pp != NULL) && (ret >= 0))
|
if((pp != NULL) && (ret >= 0))
|
||||||
*pp = der;
|
*pp = der;
|
||||||
|
else
|
||||||
|
XFREE(der, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif /* #if !defined(HAVE_FAST_RSA) */
|
#endif /* #if !defined(HAVE_FAST_RSA) */
|
||||||
|
Reference in New Issue
Block a user