aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/dist.c
diff options
context:
space:
mode:
authorSverker Eriksson <sverker@erlang.org>2013-11-04 20:44:48 +0100
committerSverker Eriksson <sverker@erlang.org>2013-11-04 20:44:48 +0100
commit00a3dade2d58836bca334be36843775343e5e269 (patch)
treec2e5e071091542f401da4b43fd713f43fd7f712e /erts/emulator/beam/dist.c
parent90b1b181d4fb147dfb7403e910a057289bdd21b2 (diff)
parentcf2159e5e43bb989f5a3f5f1b038bfa5ce33057d (diff)
downloadotp-00a3dade2d58836bca334be36843775343e5e269.tar.gz
otp-00a3dade2d58836bca334be36843775343e5e269.tar.bz2
otp-00a3dade2d58836bca334be36843775343e5e269.zip
Merge branch 'sverk/monitor-memory-leak/OTP-11410' into maint
* sverk/monitor-memory-leak/OTP-11410: erts: Fix memory leak for distributed monitors
Diffstat (limited to 'erts/emulator/beam/dist.c')
-rw-r--r--erts/emulator/beam/dist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/dist.c b/erts/emulator/beam/dist.c
index aabccac822..6ecf3f0722 100644
--- a/erts/emulator/beam/dist.c
+++ b/erts/emulator/beam/dist.c
@@ -1509,12 +1509,12 @@ int erts_net_message(Port *prt,
break;
}
rp = erts_pid2proc(NULL, 0, mon->pid, rp_locks);
+
+ erts_destroy_monitor(mon);
if (rp == NULL) {
break;
}
- erts_destroy_monitor(mon);
-
mon = erts_remove_monitor(&ERTS_P_MONITORS(rp), ref);
if (mon == NULL) {