summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhou Zhengping <johnzzpcrystal@gmail.com>2016-04-10 23:56:17 +0800
committerJeff Darcy <jdarcy@redhat.com>2016-04-14 05:51:50 -0700
commit1c9c776352c60deeda51be66fda6d44bf06d3796 (patch)
tree2cdb2ed2d183170cb646826ada5bc836f4729b85
parent401d591de168fdb648663f01c4c4f8ed60777558 (diff)
rpc: check the right variable after gf_strdup
Change-Id: If4628bd37f2c85a070f6c3b3e0583d939100d7ec BUG: 1325683 Signed-off-by: Zhou Zhengping <johnzzpcrystal@gmail.com> Reviewed-on: http://review.gluster.org/13934 Smoke: Gluster Build System <jenkins@build.gluster.com> Tested-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anoop C S <anoopcs@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Vijay Bellur <vbellur@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
-rw-r--r--rpc/rpc-lib/src/rpc-transport.c2
1 files changed, 1 insertions, 1 deletions
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;
}