diff options
author | Sverker Eriksson <[email protected]> | 2015-12-11 14:17:57 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2015-12-11 14:17:57 +0100 |
commit | efa7a08d1b16aeb280c87f035a97d31ca6eebba6 (patch) | |
tree | fe21f6e31fe560eaf2595cff97bf3e68be570310 /erts/emulator | |
parent | a2b28094081f1b185a31b33e3c1bcb377d6761bb (diff) | |
download | otp-efa7a08d1b16aeb280c87f035a97d31ca6eebba6.tar.gz otp-efa7a08d1b16aeb280c87f035a97d31ca6eebba6.tar.bz2 otp-efa7a08d1b16aeb280c87f035a97d31ca6eebba6.zip |
erts: Fix faulty cleanup when receiving broken dist msg
Bug introduced in ce8279d6a48d41f9.
Thank you valgrind.
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/beam/dist.c | 7 |
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; |