From e7c304d3d10154ca42da608e7b88bbe53cc28aec Mon Sep 17 00:00:00 2001 From: Dino <118768649+dinoruic@users.noreply.github.com> Date: Tue, 23 Dec 2025 16:14:38 -0800 Subject: [PATCH] Fix destructor rewireMiaig.h Pointers that are allocated with a C-style malloc should be deleted with free -- not with the C++-style delete. Using delete here will trip up toolchains that enforce using free for memory allocated with malloc. --- src/opt/rar/rewireMiaig.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/opt/rar/rewireMiaig.h b/src/opt/rar/rewireMiaig.h index 8e2664653..198eca738 100644 --- a/src/opt/rar/rewireMiaig.h +++ b/src/opt/rar/rewireMiaig.h @@ -441,7 +441,7 @@ inline void Miaig::release(void) { if (_data->pRequire) free(_data->pRequire); if (_data->pTable) free(_data->pTable); if (_data->pNtkMapped) Vi_Free(_data->pNtkMapped); - delete _data; + free(_data); } } @@ -612,4 +612,4 @@ inline void Miaig::attachTiming(vi *vCiArrs, vi *vCoReqs) { ABC_NAMESPACE_CXX_HEADER_END #endif // RW_ABC -#endif // REWIRE_MIAIG_H \ No newline at end of file +#endif // REWIRE_MIAIG_H