aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-11-21 20:31:43 +0100
committerSverker Eriksson <[email protected]>2017-11-21 20:31:43 +0100
commit7ac552d858a3c611052d6b109314feb509d6cc01 (patch)
tree71b7e9fcab635f9d43078d6bfbd0f92eb3a0168a /erts
parent9556949af97553ad99133d2198b8d92c18de98c7 (diff)
parent43c5b9621e4c7054378e9ff96907cca4fd92ecc7 (diff)
downloadotp-7ac552d858a3c611052d6b109314feb509d6cc01.tar.gz
otp-7ac552d858a3c611052d6b109314feb509d6cc01.tar.bz2
otp-7ac552d858a3c611052d6b109314feb509d6cc01.zip
Merge branch 'maint'
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/beam/erl_nif.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c
index d1018bab26..dbcc894ac9 100644
--- a/erts/emulator/beam/erl_nif.c
+++ b/erts/emulator/beam/erl_nif.c
@@ -544,6 +544,9 @@ void enif_clear_env(ErlNifEnv* env)
ASSERT(p == menv->env.proc);
ASSERT(p->common.id == ERTS_INVALID_PID);
ASSERT(MBUF(p) == menv->env.heap_frag);
+
+ free_tmp_objs(env);
+
if (MBUF(p) != NULL) {
erts_cleanup_offheap(&MSO(p));
clear_offheap(&MSO(p));
@@ -555,7 +558,6 @@ void enif_clear_env(ErlNifEnv* env)
menv->env.hp = menv->env.hp_end = HEAP_TOP(p);
ASSERT(!is_offheap(&MSO(p)));
- free_tmp_objs(env);
}
#ifdef DEBUG