diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2011-03-27 14:17:12 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2011-03-27 14:17:12 -0700 |
commit | 6c01e8b9f040d591f72882aff08ed21446fbb567 (patch) | |
tree | 71f04dae22291d7321e5bb244462ab1145c47ee6 /src/map/if/ifLib.c | |
parent | 1ec437d04b2fcb42054f068525c2a1b21b69fe53 (diff) | |
download | abc-6c01e8b9f040d591f72882aff08ed21446fbb567.tar.gz abc-6c01e8b9f040d591f72882aff08ed21446fbb567.tar.bz2 abc-6c01e8b9f040d591f72882aff08ed21446fbb567.zip |
Fixed a number of small bugs and memory leaks.
Diffstat (limited to 'src/map/if/ifLib.c')
-rw-r--r-- | src/map/if/ifLib.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/map/if/ifLib.c b/src/map/if/ifLib.c index 90e37a0f..3822302e 100644 --- a/src/map/if/ifLib.c +++ b/src/map/if/ifLib.c @@ -73,6 +73,7 @@ If_Lib_t * If_LutLibRead( char * FileName ) if ( i != atoi(pToken) ) { Abc_Print( 1, "Error in the LUT library file \"%s\".\n", FileName ); + ABC_FREE( p->pName ); ABC_FREE( p ); return NULL; } @@ -89,6 +90,8 @@ If_Lib_t * If_LutLibRead( char * FileName ) // check for out-of-bound if ( k > i ) { + ABC_FREE( p->pName ); + ABC_FREE( p ); Abc_Print( 1, "LUT %d has too many pins (%d). Max allowed is %d.\n", i, k, i ); return NULL; } @@ -99,6 +102,8 @@ If_Lib_t * If_LutLibRead( char * FileName ) if ( i == IF_MAX_LUTSIZE ) { + ABC_FREE( p->pName ); + ABC_FREE( p ); Abc_Print( 1, "Skipping LUTs of size more than %d.\n", i ); return NULL; } |