diff options
author | Micael Karlberg <[email protected]> | 2019-04-04 10:27:27 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2019-04-17 16:56:33 +0200 |
commit | f72edf2b0c535ba0b9598b5b9627724b8e279451 (patch) | |
tree | d256bec96ae31082e63946d8faf74533af6c78c5 /erts | |
parent | 009c2f0adcc118e19d57df214d27fdcce44c33f5 (diff) | |
download | otp-f72edf2b0c535ba0b9598b5b9627724b8e279451.tar.gz otp-f72edf2b0c535ba0b9598b5b9627724b8e279451.tar.bz2 otp-f72edf2b0c535ba0b9598b5b9627724b8e279451.zip |
[socket] Building term with terms from different env (again)
When building the (recv) select message, used terms
from different environments, which is not allowed.
OTP-15496
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/nifs/common/socket_nif.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/nifs/common/socket_nif.c b/erts/emulator/nifs/common/socket_nif.c index dd41123939..c3b5976a97 100644 --- a/erts/emulator/nifs/common/socket_nif.c +++ b/erts/emulator/nifs/common/socket_nif.c @@ -14726,7 +14726,7 @@ ERL_NIF_TERM recv_check_retry(ErlNifEnv* env, SSDBG( descP, ("SOCKET", "recv_check_retry -> SELECT for more\r\n") ); if ((sres = esock_select_read(env, descP->sock, descP, NULL, - sockRef, descP->currentReader.ref)) < 0) { + sockRef, recvRef)) < 0) { /* Ouch * Now what? We have copied ref into *its own* environment! */ @@ -14864,7 +14864,7 @@ ERL_NIF_TERM recv_check_partial_part(ErlNifEnv* env, /* SELECT for more data */ sres = esock_select_read(env, descP->sock, descP, NULL, - sockRef, descP->currentReader.ref); + sockRef, recvRef); if (sres < 0) { /* Result: {error, Reason} * Reason: {select_failed, sres, data} |