commit | 003dbad250ea471352f8b6130155c85c4c436b9d | [log] [tgz] |
---|---|---|
author | Paul Bakker <p.j.bakker@polarssl.org> | Mon Sep 09 17:26:14 2013 +0200 |
committer | Paul Bakker <p.j.bakker@polarssl.org> | Mon Sep 09 17:26:14 2013 +0200 |
tree | 14e9677b1c6292c2ce30331eccad97870d42dd8a | |
parent | a5943858d8ebac35692fde7dbd6fbc4f2410945a [diff] [blame] |
Fixed file descriptor leak in x509parse_crtpath()
diff --git a/library/x509parse.c b/library/x509parse.c index 2ab52fb..55cc9e3 100644 --- a/library/x509parse.c +++ b/library/x509parse.c
@@ -2053,7 +2053,10 @@ i = stat( entry_name, &sb ); if( i == -1 ) + { + closedir( dir ); return( POLARSSL_ERR_X509_FILE_IO_ERROR ); + } if( !S_ISREG( sb.st_mode ) ) continue;