aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-12-11 14:40:21 +0100
committerSverker Eriksson <[email protected]>2015-12-11 14:40:21 +0100
commit63ea41015e6aa28415c3446b8dee5d5208cdeb85 (patch)
treeb3f357242217954115cd332a8afe953e6516d863 /erts/emulator/beam
parent04f97abf89d39d8126c432341600268338ea5567 (diff)
parentefa7a08d1b16aeb280c87f035a97d31ca6eebba6 (diff)
downloadotp-63ea41015e6aa28415c3446b8dee5d5208cdeb85.tar.gz
otp-63ea41015e6aa28415c3446b8dee5d5208cdeb85.tar.bz2
otp-63ea41015e6aa28415c3446b8dee5d5208cdeb85.zip
Merge branch 'sverk/dist-ctrl-msg-overflow' into maint
* sverk/dist-ctrl-msg-overflow: erts: Fix faulty cleanup when receiving broken dist msg
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/dist.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/erts/emulator/beam/dist.c b/erts/emulator/beam/dist.c
index 170690ca89..7be2b77a3b 100644
--- a/erts/emulator/beam/dist.c
+++ b/erts/emulator/beam/dist.c
@@ -1231,11 +1231,11 @@ int erts_net_message(Port *prt,
arg = erts_decode_dist_ext(&factory, &ede);
if (is_non_value(arg)) {
#ifdef ERTS_DIST_MSG_DBG
- erts_fprintf(stderr, "DIST MSG DEBUG: erts_dist_ext_size(CTL) failed:\n");
+ erts_fprintf(stderr, "DIST MSG DEBUG: erts_decode_dist_ext(CTL) failed:\n");
bw(buf, orig_len);
#endif
PURIFY_MSG("data error");
- goto data_error;
+ goto decode_error;
}
ctl_len = t - buf;
@@ -1728,12 +1728,13 @@ int erts_net_message(Port *prt,
erts_dsprintf(dsbufp, "Invalid distribution message: %.200T", arg);
erts_send_error_to_logger_nogl(dsbufp);
}
- data_error:
+decode_error:
PURIFY_MSG("data error");
erts_factory_close(&factory);
if (ctl != ctl_default) {
erts_free(ERTS_ALC_T_DCTRL_BUF, (void *) ctl);
}
+data_error:
UnUseTmpHeapNoproc(DIST_CTL_DEFAULT_SIZE);
erts_deliver_port_exit(prt, dep->cid, am_killed, 0);
ERTS_SMP_CHK_NO_PROC_LOCKS;