aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_message.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-04-11 16:28:12 +0200
committerSverker Eriksson <[email protected]>2017-04-11 16:28:12 +0200
commit486a758ef245effab01d880493a0274de49c1797 (patch)
treea506758099a76c92b429f070f3e80b9932c5e916 /erts/emulator/beam/erl_message.c
parent37bdfb3b5b56c2311db1780b052b7e2c0f139cef (diff)
downloadotp-486a758ef245effab01d880493a0274de49c1797.tar.gz
otp-486a758ef245effab01d880493a0274de49c1797.tar.bz2
otp-486a758ef245effab01d880493a0274de49c1797.zip
erts: Introduce erts_bin_release
Diffstat (limited to 'erts/emulator/beam/erl_message.c')
-rw-r--r--erts/emulator/beam/erl_message.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/erts/emulator/beam/erl_message.c b/erts/emulator/beam/erl_message.c
index f181c1e3cb..17982a2d14 100644
--- a/erts/emulator/beam/erl_message.c
+++ b/erts/emulator/beam/erl_message.c
@@ -167,9 +167,7 @@ erts_cleanup_offheap(ErlOffHeap *offheap)
for (u.hdr = offheap->first; u.hdr; u.hdr = u.hdr->next) {
switch (thing_subtag(u.hdr->thing_word)) {
case REFC_BINARY_SUBTAG:
- if (erts_refc_dectest(&u.pb->val->refc, 0) == 0) {
- erts_bin_free(u.pb->val);
- }
+ erts_bin_release(u.pb->val);
break;
case FUN_SUBTAG:
if (erts_smp_refc_dectest(&u.fun->fe->refc, 0) == 0) {
@@ -178,8 +176,7 @@ erts_cleanup_offheap(ErlOffHeap *offheap)
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);
+ erts_bin_release((Binary *)u.mref->mb);
break;
default:
ASSERT(is_external_header(u.hdr->thing_word));