mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 17:35:38 +01:00
Fix memory leak in mbedtls_x509_csr_parse
This commit is contained in:
parent
32605dc830
commit
6087f200bf
@ -294,11 +294,9 @@ int mbedtls_x509_csr_parse( mbedtls_x509_csr *csr, const unsigned char *buf, siz
|
|||||||
/*
|
/*
|
||||||
* Was PEM encoded, parse the result
|
* Was PEM encoded, parse the result
|
||||||
*/
|
*/
|
||||||
if( ( ret = mbedtls_x509_csr_parse_der( csr, pem.buf, pem.buflen ) ) != 0 )
|
ret = mbedtls_x509_csr_parse_der( csr, pem.buf, pem.buflen );
|
||||||
return( ret );
|
|
||||||
|
|
||||||
mbedtls_pem_free( &pem );
|
mbedtls_pem_free( &pem );
|
||||||
return( 0 );
|
return( ret );
|
||||||
}
|
}
|
||||||
else if( ret != MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT )
|
else if( ret != MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user