From 4b647de7fd069b03f8c77b9563040424521c2453 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Wed, 29 Feb 2012 15:59:18 -0800 Subject: Bug fix in a standard cell library generator. --- src/map/amap/amapPerm.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/map/amap/amapPerm.c') diff --git a/src/map/amap/amapPerm.c b/src/map/amap/amapPerm.c index 8aef11ad..c5885c1f 100644 --- a/src/map/amap/amapPerm.c +++ b/src/map/amap/amapPerm.c @@ -113,6 +113,8 @@ Vec_Int_t * Amap_LibDeriveGatePerm_rec( Amap_Lib_t * pLib, Kit_DsdNtk_t * pNtk, iDsdFanin = Abc_LitRegular(pDsdObj->pFans[0]); pNodFanin = Amap_LibNod( pLib, Abc_Lit2Var(pNod->iFan0) ); vPermFanin = Amap_LibDeriveGatePerm_rec( pLib, pNtk, iDsdFanin, pNodFanin ); + if ( vPermFanin == NULL ) + return NULL; Vec_IntForEachEntry( vPermFanin, Value, k ) Vec_IntPush( vPerm, Value ); Vec_IntFree( vPermFanin ); @@ -120,6 +122,8 @@ Vec_Int_t * Amap_LibDeriveGatePerm_rec( Amap_Lib_t * pLib, Kit_DsdNtk_t * pNtk, iDsdFanin = Abc_LitRegular(pDsdObj->pFans[1]); pNodFanin = Amap_LibNod( pLib, Abc_Lit2Var(pNod->iFan1) ); vPermFanin = Amap_LibDeriveGatePerm_rec( pLib, pNtk, iDsdFanin, pNodFanin ); + if ( vPermFanin == NULL ) + return NULL; Vec_IntForEachEntry( vPermFanin, Value, k ) Vec_IntPush( vPerm, Value ); Vec_IntFree( vPermFanin ); @@ -127,6 +131,8 @@ Vec_Int_t * Amap_LibDeriveGatePerm_rec( Amap_Lib_t * pLib, Kit_DsdNtk_t * pNtk, iDsdFanin = Abc_LitRegular(pDsdObj->pFans[2]); pNodFanin = Amap_LibNod( pLib, Abc_Lit2Var(pNod->iFan2) ); vPermFanin = Amap_LibDeriveGatePerm_rec( pLib, pNtk, iDsdFanin, pNodFanin ); + if ( vPermFanin == NULL ) + return NULL; Vec_IntForEachEntry( vPermFanin, Value, k ) Vec_IntPush( vPerm, Value ); Vec_IntFree( vPermFanin ); -- cgit v1.2.3