summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib/src/rpcsvc.c
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2014-02-15 12:14:19 +0530
committerAnand Avati <avati@redhat.com>2014-02-16 10:50:55 -0800
commite77c485c700c9e127ae564958eb5c4733e61f888 (patch)
tree97a488493be21e9327f210973425ff8defb7e5bb /rpc/rpc-lib/src/rpcsvc.c
parent1ad41c4ca167e4600f163408c1f859d55cdbdc07 (diff)
rpc: Fix a crash due to NULL dereference
Change-Id: Ib2bf6dd564fb7e754d5441c96715b65ad2e21441 BUG: 1065611 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/7007 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'rpc/rpc-lib/src/rpcsvc.c')
-rw-r--r--rpc/rpc-lib/src/rpcsvc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c
index 96242dff77f..8be64c18aa2 100644
--- a/rpc/rpc-lib/src/rpcsvc.c
+++ b/rpc/rpc-lib/src/rpcsvc.c
@@ -1197,14 +1197,14 @@ rpcsvc_submit_generic (rpcsvc_request_t *req, struct iovec *proghdr,
"rpc-transport (%s)", req->xid,
req->prog ? req->prog->progname : "(not matched)",
req->prog ? req->prog->progver : 0,
- req->procnum, trans->name);
+ req->procnum, trans ? trans->name : "");
} else {
gf_log (GF_RPCSVC, GF_LOG_TRACE,
"submitted reply for rpc-message (XID: 0x%x, "
"Program: %s, ProgVers: %d, Proc: %d) to rpc-transport "
"(%s)", req->xid, req->prog ? req->prog->progname: "-",
req->prog ? req->prog->progver : 0,
- req->procnum, trans->name);
+ req->procnum, trans ? trans->name : "");
}
disconnect_exit: