summaryrefslogtreecommitdiff
path: root/erts/emulator/beam/binary.c
diff options
context:
space:
mode:
authorSverker Eriksson <sverker@erlang.org>2017-04-11 15:30:11 +0200
committerSverker Eriksson <sverker@erlang.org>2017-04-11 15:30:11 +0200
commit5e8f498b810aeae9cb4c9c3715fe62a33b84cdde (patch)
tree1f509dc5061a37d439dca19fc96a1402814ac8cb /erts/emulator/beam/binary.c
parent647984f14188ba2cf73128c09e888d4bcf733a9f (diff)
downloaderlang-5e8f498b810aeae9cb4c9c3715fe62a33b84cdde.tar.gz
erts: Init refc=1 in erts_bin_nrml_alloc
Only term_to_binary needed some extra attention as it used to initialize refc as 0 instead of 1.
Diffstat (limited to 'erts/emulator/beam/binary.c')
-rw-r--r--erts/emulator/beam/binary.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/erts/emulator/beam/binary.c b/erts/emulator/beam/binary.c
index 4dd8316dad..0df6bbb289 100644
--- a/erts/emulator/beam/binary.c
+++ b/erts/emulator/beam/binary.c
@@ -84,7 +84,6 @@ new_binary(Process *p, byte *buf, Uint len)
* Allocate the binary struct itself.
*/
bptr = erts_bin_nrml_alloc(len);
- erts_refc_init(&bptr->refc, 1);
if (buf != NULL) {
sys_memcpy(bptr->orig_bytes, buf, len);
}
@@ -121,7 +120,6 @@ Eterm erts_new_mso_binary(Process *p, byte *buf, Uint len)
* Allocate the binary struct itself.
*/
bptr = erts_bin_nrml_alloc(len);
- erts_refc_init(&bptr->refc, 1);
if (buf != NULL) {
sys_memcpy(bptr->orig_bytes, buf, len);
}