aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe/hipe_bif0.c
diff options
context:
space:
mode:
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;
}
}