From: Martin Liska Date: Sat, 20 Mar 2021 19:57:13 +0000 (+0100) Subject: C++ modules: fix alloc-dealloc-mismatch ASAN issue X-Git-Tag: basepoints/gcc-12~496 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c4519fe3db366d781f342b7f04c4a09e4cc9fbd9;p=thirdparty%2Fgcc.git C++ modules: fix alloc-dealloc-mismatch ASAN issue gcc/cp/ChangeLog: PR c++/99687 * module.cc (fini_modules): Call vec_free instead of delete. --- diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc index 6dbdc926cb4e..551cb66a6d48 100644 --- a/gcc/cp/module.cc +++ b/gcc/cp/module.cc @@ -20009,7 +20009,7 @@ fini_modules () modules_hash = NULL; /* Or entity array. We still need the entity map to find import numbers. */ - delete entity_ary; + vec_free (entity_ary); entity_ary = NULL; /* Or remember any pending entities. */