aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/dist.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2013-10-17 15:10:48 +0200
committerSverker Eriksson <[email protected]>2013-10-17 15:10:48 +0200
commitcf2159e5e43bb989f5a3f5f1b038bfa5ce33057d (patch)
treee00ee8a4eb2f8aaf34b0b224334edd11e0818ea0 /erts/emulator/beam/dist.c
parent20641fe0f2ea745873fc7557448d3a7deb1bd639 (diff)
downloadotp-cf2159e5e43bb989f5a3f5f1b038bfa5ce33057d.tar.gz
otp-cf2159e5e43bb989f5a3f5f1b038bfa5ce33057d.tar.bz2
otp-cf2159e5e43bb989f5a3f5f1b038bfa5ce33057d.zip
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 44f4eb9d43..95d2c5b362 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) {