Bug 789118 - Freeing null iobuf in rpc_clnt_submit
Summary: Freeing null iobuf in rpc_clnt_submit
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: rpc
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Jeff Darcy
QA Contact: Raghavendra Bhat
URL:
Whiteboard:
Depends On:
Blocks: 817967
TreeView+ depends on / blocked
 
Reported: 2012-02-09 21:02 UTC by Jeff Darcy
Modified: 2013-07-24 17:32 UTC (History)
2 users (show)

Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-24 17:32:19 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions: glusterfs-3.3.0qa42
Embargoed:


Attachments (Terms of Use)

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);
}


Note You need to log in before you can comment on or make changes to this bug.