summaryrefslogtreecommitdiff
path: root/rts/Libdw.c
diff options
context:
space:
mode:
authornineonine <mail4chemik@gmail.com>2021-10-25 09:38:22 -0700
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-12-10 06:16:41 -0500
commitf573cb16debc5424e502b3777430c02ae6d0b475 (patch)
treedeb8abbab6a0ff0ab1df96a76a014d3d3017ccd1 /rts/Libdw.c
parent80a25502c1f9ac4597c9408931df1bf03cad5b9e (diff)
downloadhaskell-f573cb16debc5424e502b3777430c02ae6d0b475.tar.gz
rts: use allocation helpers from RtsUtils
Just a tiny cleanup inspired by the following comment: https://gitlab.haskell.org/ghc/ghc/-/issues/19437#note_334271 I was just getting familiar with rts code base so I thought might as well do this.
Diffstat (limited to 'rts/Libdw.c')
-rw-r--r--rts/Libdw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rts/Libdw.c b/rts/Libdw.c
index 25399a00fe..335d99861b 100644
--- a/rts/Libdw.c
+++ b/rts/Libdw.c
@@ -95,7 +95,7 @@ LibdwSession *libdwInit() {
session->dwfl = dwfl_begin (&proc_callbacks);
if (session->dwfl == NULL) {
sysErrorBelch("dwfl_begin failed: %s", dwfl_errmsg(dwfl_errno()));
- free(session);
+ stgFree(session);
return NULL;
}
@@ -122,7 +122,7 @@ LibdwSession *libdwInit() {
fail:
dwfl_end(session->dwfl);
- free(session);
+ stgFree(session);
return NULL;
}
@@ -194,7 +194,7 @@ int libdwForEachFrameOutwards(Backtrace *bt,
if (res != 0) break;
}
}
- free(chunks);
+ stgFree(chunks);
return res;
}