Bug 789118

Summary: Freeing null iobuf in rpc_clnt_submit
Product: [Community] GlusterFS Reporter: Jeff Darcy <jdarcy>
Component: rpcAssignee: Jeff Darcy <jdarcy>
Status: CLOSED CURRENTRELEASE QA Contact: Raghavendra Bhat <rabhat>
Severity: low Docs Contact:
Priority: unspecified    
Version: mainlineCC: amarts, gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.4.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-24 17:32:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: glusterfs-3.3.0qa42 Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 817967    

Description Jeff Darcy 2012-02-09 21:02:12 UTC
If we fail to allocate request_iob, we jump to a label where we immediately and unconditionally call iobuf_unref on the definitely-null pointer.

Setting to low priority because if we can't allocate an iobuf then we probably have more serious problems.  This is unlikely to be hit in practice except for weirdos (like me) trying to abuse the RPC system, but checking before dereferencing is still good form.

Comment 1 Anand Avati 2012-02-10 10:59:30 UTC
CHANGE: http://review.gluster.com/2732 (Fix case where we free a definitely-NULL iobuf) merged in master by Vijay Bellur (vijay)

Comment 2 Raghavendra Bhat 2012-05-22 06:11:30 UTC
Now before unrefing the iobuf we check if it is NULL or not. checked with glusterfs-3.3.0qa42.

if (request_iob) {
      iobuf_unref (request_iob);
}