diff mbox series

Fix freeing of thunk_info

Message ID 20201129222301.GA80229@kam.mff.cuni.cz
State New
Headers show
Series Fix freeing of thunk_info | expand

Commit Message

Jan Hubicka Nov. 29, 2020, 10:23 p.m. UTC
Hi,
thunk_info should be freed with ggc_delete since it is ggc allocated.

Bootstrapped/regtested x86_64-linux,
Honza
	PR jit/97867
	* symtab-thunks.h (thunk_info::release): Use ggc_delete.
diff mbox series

Patch

diff --git a/gcc/symtab-thunks.h b/gcc/symtab-thunks.h
index 41a684995b3..0dba2217793 100644
--- a/gcc/symtab-thunks.h
+++ b/gcc/symtab-thunks.h
@@ -167,7 +167,7 @@  inline void
 thunk_info::release ()
 {
   if (symtab->m_thunks)
-    delete (symtab->m_thunks);
+    ggc_delete (symtab->m_thunks);
   symtab->m_thunks = NULL;
 }
 #endif  /* GCC_SYMTAB_THUNKS_H  */