aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2014-09-05 15:04:53 +0200
committerRickard Green <[email protected]>2014-09-05 15:04:53 +0200
commitb3a7e7f84b6e6183113ee961b06d3765de7a48b3 (patch)
tree38e5e4d32d003aed6fa9ab01fb60e9d07ba6f389 /erts/emulator/beam/erl_process.c
parentfbd740bcbd99899d2bd53742a9d9377ee738d98d (diff)
parent18a38b9e5f5fbf4aa8fb7d349bc493c78626d3f6 (diff)
downloadotp-b3a7e7f84b6e6183113ee961b06d3765de7a48b3.tar.gz
otp-b3a7e7f84b6e6183113ee961b06d3765de7a48b3.tar.bz2
otp-b3a7e7f84b6e6183113ee961b06d3765de7a48b3.zip
Merge branch 'vinoski/enif-schedule-nif' into maint
OTP-12128 * vinoski/enif-schedule-nif: Fix leak of NIF exports Use separate allocation type for NIF export
Diffstat (limited to 'erts/emulator/beam/erl_process.c')
-rw-r--r--erts/emulator/beam/erl_process.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index 685004f267..20a88ec581 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -11872,6 +11872,7 @@ erts_continue_exit_process(Process *p)
struct saved_calls *scb;
process_breakpoint_time_t *pbt;
erts_aint32_t state;
+ void *nif_export;
#ifdef DEBUG
int yield_allowed = 1;
@@ -12022,6 +12023,7 @@ erts_continue_exit_process(Process *p)
: NULL);
scb = ERTS_PROC_SET_SAVED_CALLS_BUF(p, ERTS_PROC_LOCKS_ALL, NULL);
pbt = ERTS_PROC_SET_CALL_TIME(p, ERTS_PROC_LOCKS_ALL, NULL);
+ nif_export = ERTS_PROC_SET_NIF_TRAP_EXPORT(p, ERTS_PROC_LOCKS_ALL, NULL);
erts_smp_proc_unlock(p, ERTS_PROC_LOCKS_ALL);
#ifdef BM_COUNTERS
@@ -12069,6 +12071,9 @@ erts_continue_exit_process(Process *p)
if (pbt)
erts_free(ERTS_ALC_T_BPD, (void *) pbt);
+ if (nif_export)
+ erts_destroy_nif_export(nif_export);
+
delete_process(p);
#ifdef ERTS_SMP