aboutsummaryrefslogtreecommitdiff
path: root/src/protocol/reqrep/req.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol/reqrep/req.c')
-rw-r--r--src/protocol/reqrep/req.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/protocol/reqrep/req.c b/src/protocol/reqrep/req.c
index 553ef0bf..f37913e6 100644
--- a/src/protocol/reqrep/req.c
+++ b/src/protocol/reqrep/req.c
@@ -110,12 +110,10 @@ nni_req_sock_fini(void *arg)
{
nni_req_sock *req = arg;
- if (req != NULL) {
- if (req->reqmsg != NULL) {
- nni_msg_free(req->reqmsg);
- }
- NNI_FREE_STRUCT(req);
+ if (req->reqmsg != NULL) {
+ nni_msg_free(req->reqmsg);
}
+ NNI_FREE_STRUCT(req);
}