summaryrefslogtreecommitdiffstats
path: root/src/aig/ntl/ntlReadBlif.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2011-03-27 14:17:12 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2011-03-27 14:17:12 -0700
commit6c01e8b9f040d591f72882aff08ed21446fbb567 (patch)
tree71f04dae22291d7321e5bb244462ab1145c47ee6 /src/aig/ntl/ntlReadBlif.c
parent1ec437d04b2fcb42054f068525c2a1b21b69fe53 (diff)
downloadabc-6c01e8b9f040d591f72882aff08ed21446fbb567.tar.gz
abc-6c01e8b9f040d591f72882aff08ed21446fbb567.tar.bz2
abc-6c01e8b9f040d591f72882aff08ed21446fbb567.zip
Fixed a number of small bugs and memory leaks.
Diffstat (limited to 'src/aig/ntl/ntlReadBlif.c')
-rw-r--r--src/aig/ntl/ntlReadBlif.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/aig/ntl/ntlReadBlif.c b/src/aig/ntl/ntlReadBlif.c
index 103f8540..88962efa 100644
--- a/src/aig/ntl/ntlReadBlif.c
+++ b/src/aig/ntl/ntlReadBlif.c
@@ -444,6 +444,7 @@ static char * Ntl_ReadLoadFile( char * pFileName )
pFile = fopen( pFileName, "rb" );
if ( pFile == NULL )
{
+ fclose( pFile );
printf( "Ntl_ReadLoadFile(): The file is unavailable (absent or open).\n" );
return NULL;
}
@@ -451,6 +452,7 @@ static char * Ntl_ReadLoadFile( char * pFileName )
nFileSize = ftell( pFile );
if ( nFileSize == 0 )
{
+ fclose( pFile );
printf( "Ntl_ReadLoadFile(): The file is empty.\n" );
return NULL;
}