aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe/hipe_bif0.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-09-16 20:01:11 +0200
committerSverker Eriksson <[email protected]>2016-10-14 14:29:15 +0200
commite36c8d49359db1622ad381f705c54d460c4fb5e9 (patch)
treeff4d704db319f3b60c5ef8af02fa6855c3b489b7 /erts/emulator/hipe/hipe_bif0.c
parenta82be01198c1f3714f29f0a0e3ce3ed6d6bce0a6 (diff)
downloadotp-e36c8d49359db1622ad381f705c54d460c4fb5e9.tar.gz
otp-e36c8d49359db1622ad381f705c54d460c4fb5e9.tar.bz2
otp-e36c8d49359db1622ad381f705c54d460c4fb5e9.zip
erts: Use hipe_free_module
Diffstat (limited to 'erts/emulator/hipe/hipe_bif0.c')
-rw-r--r--erts/emulator/hipe/hipe_bif0.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/erts/emulator/hipe/hipe_bif0.c b/erts/emulator/hipe/hipe_bif0.c
index daa198d695..46d4378f21 100644
--- a/erts/emulator/hipe/hipe_bif0.c
+++ b/erts/emulator/hipe/hipe_bif0.c
@@ -1743,14 +1743,9 @@ void hipe_purge_module(Module* modp)
prevp = &p->next_in_mod;
}
}
- if (modp->old.hipe_code && modp->old.hipe_code->text_segment) {
-#ifdef DEBUG
- sys_memset(modp->old.hipe_code->text_segment, 0xfe,
- modp->old.hipe_code->text_segment_size);
-#endif
- hipe_free_code(modp->old.hipe_code->text_segment);
- modp->old.hipe_code->text_segment = NULL;
- modp->old.hipe_code->text_segment_size = 0;
+ if (modp->old.hipe_code) {
+ hipe_free_module(modp->old.hipe_code);
+ modp->old.hipe_code = NULL;
}
}