From 1b44116337b9ef59c2286b88e0b90d596caab270 Mon Sep 17 00:00:00 2001 From: Zhou Zhengping Date: Sun, 10 Apr 2016 23:56:17 +0800 Subject: rpc: check the right variable after gf_strdup > Reviewed-on: http://review.gluster.org/13934 > Smoke: Gluster Build System > Tested-by: Jeff Darcy > Reviewed-by: Anoop C S > NetBSD-regression: NetBSD Build System > Reviewed-by: Vijay Bellur > CentOS-regression: Gluster Build System (cherry picked from commit 1c9c776352c60deeda51be66fda6d44bf06d3796) Change-Id: If4628bd37f2c85a070f6c3b3e0583d939100d7ec BUG: 1332404 Signed-off-by: Zhou Zhengping Reviewed-on: http://review.gluster.org/14494 Smoke: Gluster Build System Tested-by: Anoop C S NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Raghavendra G --- rpc/rpc-lib/src/rpc-transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c index 0904dbee716..1cd16831e22 100644 --- a/rpc/rpc-lib/src/rpc-transport.c +++ b/rpc/rpc-lib/src/rpc-transport.c @@ -674,7 +674,7 @@ rpc_transport_inet_options_build (dict_t **options, const char *hostname, goto out; host = gf_strdup ((char*)hostname); - if (!hostname) { + if (!host) { ret = -1; goto out; } -- cgit