summaryrefslogtreecommitdiff
path: root/rts/Stats.c
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2011-04-14 16:38:00 +0100
committerSimon Marlow <marlowsd@gmail.com>2011-04-15 10:50:08 +0100
commitcfe22ecbdac3b2340787110e0093239956f17c3d (patch)
tree09518153497ca248325d8ab816511d2932aea525 /rts/Stats.c
parent6251f729b80fa3ece8447a979e9002a2541e9cef (diff)
downloadhaskell-cfe22ecbdac3b2340787110e0093239956f17c3d.tar.gz
fix a shutdown memory leak
Diffstat (limited to 'rts/Stats.c')
-rw-r--r--rts/Stats.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/rts/Stats.c b/rts/Stats.c
index 3e7b5d822f..fa38472129 100644
--- a/rts/Stats.c
+++ b/rts/Stats.c
@@ -753,12 +753,18 @@ stat_exit(int alloc)
statsClose();
}
- if (GC_coll_cpu)
+ if (GC_coll_cpu) {
stgFree(GC_coll_cpu);
- GC_coll_cpu = NULL;
- if (GC_coll_elapsed)
+ GC_coll_cpu = NULL;
+ }
+ if (GC_coll_elapsed) {
stgFree(GC_coll_elapsed);
- GC_coll_elapsed = NULL;
+ GC_coll_elapsed = NULL;
+ }
+ if (GC_coll_max_pause) {
+ stgFree(GC_coll_max_pause);
+ GC_coll_max_pause = NULL;
+ }
}
/* -----------------------------------------------------------------------------