Bug 1325683

Summary: the wrong variable was being checked for gf_strdup
Product: [Community] GlusterFS Reporter: Zhou Zhengping <johnzzpcrystal>
Component: rpcAssignee: Zhou Zhengping <johnzzpcrystal>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: mainlineCC: anoopcs, bugs, johnzzpcrystal
Target Milestone: ---Keywords: EasyFix
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: glusterfs-3.8.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1332404 (view as bug list) Environment:
Last Closed: 2016-05-28 05:54:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1332404    

Description Zhou Zhengping 2016-04-10 15:57:01 UTC
in function  rpc_transport_inet_options_build :

host = gf_strdup ((char*)hostname);
if (!hostname) {
    ret = -1;
    goto out;
}

hostname should be host

Comment 1 Vijay Bellur 2016-04-10 15:58:27 UTC
REVIEW: http://review.gluster.org/13934 (rpc: check the right variable after gf_strdup) posted (#1) for review on master by Zhou Zhengping (johnzzpcrystal)

Comment 2 Vijay Bellur 2016-04-11 14:56:07 UTC
REVIEW: http://review.gluster.org/13934 (rpc: check the right variable after gf_strdup) posted (#2) for review on master by Zhou Zhengping (johnzzpcrystal)

Comment 3 Vijay Bellur 2016-04-11 23:54:51 UTC
REVIEW: http://review.gluster.org/13934 (rpc: check the right variable after gf_strdup) posted (#3) for review on master by Zhou Zhengping (johnzzpcrystal)

Comment 4 Vijay Bellur 2016-04-14 12:51:54 UTC
COMMIT: http://review.gluster.org/13934 committed in master by Jeff Darcy (jdarcy) 
------
commit 1c9c776352c60deeda51be66fda6d44bf06d3796
Author: Zhou Zhengping <johnzzpcrystal>
Date:   Sun Apr 10 23:56:17 2016 +0800

    rpc: check the right variable after gf_strdup
    
    Change-Id: If4628bd37f2c85a070f6c3b3e0583d939100d7ec
    BUG: 1325683
    Signed-off-by: Zhou Zhengping <johnzzpcrystal>
    Reviewed-on: http://review.gluster.org/13934
    Smoke: Gluster Build System <jenkins.com>
    Tested-by: Jeff Darcy <jdarcy>
    Reviewed-by: Anoop C S <anoopcs>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    Reviewed-by: Vijay Bellur <vbellur>
    CentOS-regression: Gluster Build System <jenkins.com>

Comment 5 Anoop C S 2016-05-03 06:55:16 UTC
Hi Zhou Zhengping,

Can you please back port this change to release-3.7 branch? You can use the following for guidelines:

http://gluster.readthedocs.io/en/latest/Developer-guide/Backport-Guidelines/

To ease the process I have cloned this BZ to 3.7 version. Use BZ #1332404 for back porting the patch.

Comment 6 Anoop C S 2016-05-23 07:39:27 UTC
I have back-ported the fix to release-3.7 branch for now.