From 44f8b8bca3d9c6ac45934daa6b74c1e6307582ea Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Fri, 17 Aug 2007 15:02:05 +0000 Subject: [PATCH] Don't freeProfiling1 until after calling reportCCSProfiling Fixes usage of free'd memory --- rts/RtsStartup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c index 4f5b1c7..951b07f 100644 --- a/rts/RtsStartup.c +++ b/rts/RtsStartup.c @@ -463,8 +463,6 @@ hs_exit_(rtsBool wait_foreign) /* free the stable pointer table */ exitStablePtrTable(); - freeProfiling1(); - #if defined(DEBUG) /* free the thread label table */ freeThreadLabelTable(); @@ -480,6 +478,8 @@ hs_exit_(rtsBool wait_foreign) reportCCSProfiling(); #endif + freeProfiling1(); + endProfiling(); #ifdef PROFILING -- 1.7.10.4