commit | f6a19bd728d5a94b2575477942210cdb2a93ef70 | [log] [tgz] |
---|---|---|
author | Paul Bakker <p.j.bakker@polarssl.org> | Tue May 14 13:26:51 2013 +0200 |
committer | Paul Bakker <p.j.bakker@polarssl.org> | Tue May 14 13:26:51 2013 +0200 |
tree | edbba53f162cd61b32c0d708340ea844c5de4c81 | |
parent | c72d3f7d8552eb6302ece4823efe8ab68e6512a9 [diff] [blame] |
Possible resource leak on FILE* removed in X509 parse
diff --git a/library/x509parse.c b/library/x509parse.c index 3e99bdc..3ddfb14 100644 --- a/library/x509parse.c +++ b/library/x509parse.c
@@ -1812,7 +1812,10 @@ fseek( f, 0, SEEK_SET ); if( ( *buf = (unsigned char *) malloc( *n + 1 ) ) == NULL ) + { + fclose( f ); return( POLARSSL_ERR_X509_MALLOC_FAILED ); + } if( fread( *buf, 1, *n, f ) != *n ) {