diff options
author | Sverker Eriksson <[email protected]> | 2017-04-11 16:28:12 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2017-04-11 16:28:12 +0200 |
commit | 486a758ef245effab01d880493a0274de49c1797 (patch) | |
tree | a506758099a76c92b429f070f3e80b9932c5e916 /erts/emulator/beam/erl_db_util.c | |
parent | 37bdfb3b5b56c2311db1780b052b7e2c0f139cef (diff) | |
download | otp-486a758ef245effab01d880493a0274de49c1797.tar.gz otp-486a758ef245effab01d880493a0274de49c1797.tar.bz2 otp-486a758ef245effab01d880493a0274de49c1797.zip |
erts: Introduce erts_bin_release
Diffstat (limited to 'erts/emulator/beam/erl_db_util.c')
-rw-r--r-- | erts/emulator/beam/erl_db_util.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/erts/emulator/beam/erl_db_util.c b/erts/emulator/beam/erl_db_util.c index 03cc11bdc4..24b22eafb8 100644 --- a/erts/emulator/beam/erl_db_util.c +++ b/erts/emulator/beam/erl_db_util.c @@ -3265,9 +3265,7 @@ void db_cleanup_offheap_comp(DbTerm* obj) } 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: ASSERT(u.pb != &tmp); @@ -3277,8 +3275,7 @@ void db_cleanup_offheap_comp(DbTerm* obj) 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)); |