aboutsummaryrefslogtreecommitdiff
path: root/src/protocol/reqrep0/req.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2020-05-24 16:20:13 -0700
committerGarrett D'Amore <garrett@damore.org>2020-05-25 06:56:08 -0700
commit79aed583c14424dcb737eafcdc5273cc4ed40d75 (patch)
tree170c4d4d461cc09fee9519fceebdeb8a15a86da4 /src/protocol/reqrep0/req.c
parent7af3747a3579eea07080df2693d89e2061520392 (diff)
downloadnng-79aed583c14424dcb737eafcdc5273cc4ed40d75.tar.gz
nng-79aed583c14424dcb737eafcdc5273cc4ed40d75.tar.bz2
nng-79aed583c14424dcb737eafcdc5273cc4ed40d75.zip
fixes #1241 SIGSEGV in RepReq's rep0 recv - use after free
This also affects the respondent protocol. Examination of the other protocols did not turn up any evidence of the same issue.
Diffstat (limited to 'src/protocol/reqrep0/req.c')
-rw-r--r--src/protocol/reqrep0/req.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/protocol/reqrep0/req.c b/src/protocol/reqrep0/req.c
index cb716941..0112f835 100644
--- a/src/protocol/reqrep0/req.c
+++ b/src/protocol/reqrep0/req.c
@@ -311,6 +311,8 @@ req0_recv_cb(void *arg)
// Schedule another receive while we are processing this.
nni_mtx_lock(&s->mtx);
+
+ // NB: If close was called, then this will just abort.
nni_pipe_recv(p->pipe, &p->aio_recv);
// Look for a context to receive it.