aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-11-21 20:31:43 +0100
committerSverker Eriksson <[email protected]>2017-11-21 20:31:43 +0100
commit7ac552d858a3c611052d6b109314feb509d6cc01 (patch)
tree71b7e9fcab635f9d43078d6bfbd0f92eb3a0168a
parent9556949af97553ad99133d2198b8d92c18de98c7 (diff)
parent43c5b9621e4c7054378e9ff96907cca4fd92ecc7 (diff)
downloadotp-7ac552d858a3c611052d6b109314feb509d6cc01.tar.gz
otp-7ac552d858a3c611052d6b109314feb509d6cc01.tar.bz2
otp-7ac552d858a3c611052d6b109314feb509d6cc01.zip
Merge branch 'maint'
-rw-r--r--erts/emulator/beam/erl_nif.c4
-rw-r--r--lib/crypto/c_src/crypto.c1
2 files changed, 3 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c
index d1018bab26..dbcc894ac9 100644
--- a/erts/emulator/beam/erl_nif.c
+++ b/erts/emulator/beam/erl_nif.c
@@ -544,6 +544,9 @@ void enif_clear_env(ErlNifEnv* env)
ASSERT(p == menv->env.proc);
ASSERT(p->common.id == ERTS_INVALID_PID);
ASSERT(MBUF(p) == menv->env.heap_frag);
+
+ free_tmp_objs(env);
+
if (MBUF(p) != NULL) {
erts_cleanup_offheap(&MSO(p));
clear_offheap(&MSO(p));
@@ -555,7 +558,6 @@ void enif_clear_env(ErlNifEnv* env)
menv->env.hp = menv->env.hp_end = HEAP_TOP(p);
ASSERT(!is_offheap(&MSO(p)));
- free_tmp_objs(env);
}
#ifdef DEBUG
diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c
index b29c5082ba..72429c51fb 100644
--- a/lib/crypto/c_src/crypto.c
+++ b/lib/crypto/c_src/crypto.c
@@ -4657,7 +4657,6 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM
enif_alloc_binary(outlen, &out_bin);
- ERL_VALGRIND_ASSERT_MEM_DEFINED(out_bin.data, out_bin.size);
if (is_private) {
if (is_encrypt) {
/* private_encrypt */