aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_db_util.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-02-16 19:11:54 +0100
committerRickard Green <[email protected]>2017-02-16 19:11:54 +0100
commitfc5a4a227968001cb031802c5a122cdbb0323b25 (patch)
tree013af366dc89bf9f0cebdfc3a873e71641a3d349 /erts/emulator/beam/erl_db_util.c
parent4499687a325178727a7be62124c1ca52f59b1287 (diff)
downloadotp-fc5a4a227968001cb031802c5a122cdbb0323b25.tar.gz
otp-fc5a4a227968001cb031802c5a122cdbb0323b25.tar.bz2
otp-fc5a4a227968001cb031802c5a122cdbb0323b25.zip
Handle magic refs in db_cleanup_offheap_comp()
Diffstat (limited to 'erts/emulator/beam/erl_db_util.c')
-rw-r--r--erts/emulator/beam/erl_db_util.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_db_util.c b/erts/emulator/beam/erl_db_util.c
index 3ac2bdd3d6..6f30b1d3dd 100644
--- a/erts/emulator/beam/erl_db_util.c
+++ b/erts/emulator/beam/erl_db_util.c
@@ -3104,6 +3104,11 @@ void db_cleanup_offheap_comp(DbTerm* obj)
erts_erase_fun_entry(u.fun->fe);
}
break;
+ case REF_SUBTAG:
+ ASSERT(is_magic_ref_thing(u.hdr));
+ if (erts_refc_dectest(&u.mref->mb->refc, 0) == 0)
+ erts_bin_free((Binary *)u.mref->mb);
+ break;
default:
ASSERT(is_external_header(u.hdr->thing_word));
ASSERT(u.pb != &tmp);