aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/protocol/survey/survey.c7
-rw-r--r--tests/reqrep.c1
2 files changed, 5 insertions, 3 deletions
diff --git a/src/protocol/survey/survey.c b/src/protocol/survey/survey.c
index c7ce1c16..087211a2 100644
--- a/src/protocol/survey/survey.c
+++ b/src/protocol/survey/survey.c
@@ -114,10 +114,11 @@ nni_surv_pipe_init(void **pp, nni_pipe *npipe, void *psock)
static void
nni_surv_pipe_fini(void *arg)
{
- nni_surv_pipe *sp = arg;
+ nni_surv_pipe *ppipe = arg;
- if (sp != NULL) {
- NNI_FREE_STRUCT(sp);
+ if (ppipe != NULL) {
+ nni_msgq_fini(ppipe->sendq);
+ NNI_FREE_STRUCT(ppipe);
}
}
diff --git a/tests/reqrep.c b/tests/reqrep.c
index 1a9f3735..9fd2a206 100644
--- a/tests/reqrep.c
+++ b/tests/reqrep.c
@@ -9,6 +9,7 @@
#include "convey.h"
#include "nng.h"
+#include "core/nng_impl.h"
#include <string.h>