aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/dist.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2018-08-21 15:05:26 +0200
committerRickard Green <[email protected]>2018-08-21 15:05:26 +0200
commitee4d5eb50da8fcf06807ae53835b3d1c3e0215e0 (patch)
treeb9214e896cd4131758334268fba3a30b97fca885 /erts/emulator/beam/dist.c
parentd23487f5daa4e898767b8171732c0fe0516bc1d0 (diff)
downloadotp-ee4d5eb50da8fcf06807ae53835b3d1c3e0215e0.tar.gz
otp-ee4d5eb50da8fcf06807ae53835b3d1c3e0215e0.tar.bz2
otp-ee4d5eb50da8fcf06807ae53835b3d1c3e0215e0.zip
Cleanup unused dist output buf immediately instead of at GC
Diffstat (limited to 'erts/emulator/beam/dist.c')
-rw-r--r--erts/emulator/beam/dist.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/beam/dist.c b/erts/emulator/beam/dist.c
index 6f54421805..abb08413d0 100644
--- a/erts/emulator/beam/dist.c
+++ b/erts/emulator/beam/dist.c
@@ -1938,6 +1938,8 @@ erts_dsig_send(ErtsDSigData *dsdp, struct erts_dsig_send_context* ctx)
ctx->data_size = ctx->obuf->ext_endp - ctx->obuf->extp;
if (ctx->data_size > (Uint) INT_MAX) {
+ free_dist_obuf(ctx->obuf);
+ ctx->obuf = NULL;
retval = ERTS_DSIG_SEND_TOO_LRG;
goto done;
}