mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 12:35:40 +01:00
Fix potential resource leak in X.509 parse dir
Found with fbinfer.
This commit is contained in:
parent
bcf13bab5d
commit
f9b85d96a9
@ -1155,7 +1155,10 @@ int mbedtls_x509_crt_parse_path( mbedtls_x509_crt *chain, const char *path )
|
||||
|
||||
#if defined(MBEDTLS_THREADING_PTHREAD)
|
||||
if( ( ret = mbedtls_mutex_lock( &mbedtls_threading_readdir_mutex ) ) != 0 )
|
||||
{
|
||||
closedir( dir );
|
||||
return( ret );
|
||||
}
|
||||
#endif
|
||||
|
||||
while( ( entry = readdir( dir ) ) != NULL )
|
||||
|
Loading…
Reference in New Issue
Block a user