diff options
Diffstat (limited to 'src/bdd')
-rw-r--r-- | src/bdd/cudd/cuddExport.c | 4 | ||||
-rw-r--r-- | src/bdd/parse/parseEqn.c | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/bdd/cudd/cuddExport.c b/src/bdd/cudd/cuddExport.c index 3b2e989d..c0cac4ec 100644 --- a/src/bdd/cudd/cuddExport.c +++ b/src/bdd/cudd/cuddExport.c @@ -780,6 +780,7 @@ Cudd_DumpDDcal( if (diff <= mask) break; } st_free_table(visited); + visited = NULL; /* Build a bit array with the support of f. */ sorted = ABC_ALLOC(int,nvars); @@ -851,7 +852,8 @@ Cudd_DumpDDcal( retval = fprintf(fp, "]\n"); if (retval == EOF) goto failure; - st_free_table(visited); + if ( visited ) + st_free_table(visited); return(1); failure: diff --git a/src/bdd/parse/parseEqn.c b/src/bdd/parse/parseEqn.c index 55b9c2f0..ed2599ca 100644 --- a/src/bdd/parse/parseEqn.c +++ b/src/bdd/parse/parseEqn.c @@ -184,6 +184,8 @@ Hop_Obj_t * Parse_FormulaParserEqn( FILE * pOutput, char * pFormInit, Vec_Ptr_t // perform the given operation if ( Parse_ParserPerformTopOp( pMan, pStackFn, Oper ) == NULL ) { + Parse_StackFnFree( pStackFn ); + Parse_StackOpFree( pStackOp ); fprintf( pOutput, "Parse_FormulaParserEqn(): Unknown operation\n" ); ABC_FREE( pFormula ); return NULL; @@ -277,6 +279,8 @@ Hop_Obj_t * Parse_FormulaParserEqn( FILE * pOutput, char * pFormInit, Vec_Ptr_t { fprintf( pOutput, "Parse_FormulaParserEqn(): Unknown operation\n" ); ABC_FREE( pFormula ); + Parse_StackFnFree( pStackFn ); + Parse_StackOpFree( pStackOp ); return NULL; } Parse_StackOpPush( pStackOp, Oper1 ); // push the last operation back |