From 1c9c776352c60deeda51be66fda6d44bf06d3796 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 Change-Id: If4628bd37f2c85a070f6c3b3e0583d939100d7ec BUG: 1325683 Signed-off-by: Zhou Zhengping 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 --- rpc/rpc-lib/src/rpc-transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rpc') diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c index ca5d51488f2..e224dcc022e 100644 --- a/rpc/rpc-lib/src/rpc-transport.c +++ b/rpc/rpc-lib/src/rpc-transport.c @@ -669,7 +669,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