From 5e8f498b810aeae9cb4c9c3715fe62a33b84cdde Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 11 Apr 2017 15:30:11 +0200 Subject: 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. --- erts/emulator/beam/erl_bif_binary.c | 1 - 1 file changed, 1 deletion(-) (limited to 'erts/emulator/beam/erl_bif_binary.c') diff --git a/erts/emulator/beam/erl_bif_binary.c b/erts/emulator/beam/erl_bif_binary.c index 62a752d854..f79b5b6843 100644 --- a/erts/emulator/beam/erl_bif_binary.c +++ b/erts/emulator/beam/erl_bif_binary.c @@ -2669,7 +2669,6 @@ static BIF_RETTYPE do_binary_copy(Process *p, Eterm bin, Eterm en) } cbs->result = erts_bin_nrml_alloc(target_size); /* Always offheap if trapping */ - erts_refc_init(&(cbs->result->refc), 1); t = (byte *) cbs->result->orig_bytes; /* No offset or anything */ pos = 0; i = 0; -- cgit v1.2.3