[Bugs] [Bug 1405885] New: Fix potential leaks in INODELK cbk in protocol/client

bugzilla at redhat.com bugzilla at redhat.com
Mon Dec 19 04:13:54 UTC 2016


https://bugzilla.redhat.com/show_bug.cgi?id=1405885

            Bug ID: 1405885
           Summary: Fix potential leaks in INODELK cbk in protocol/client
           Product: GlusterFS
           Version: 3.9
         Component: core
          Keywords: Triaged
          Assignee: bugs at gluster.org
          Reporter: kdhananj at redhat.com
                CC: bugs at gluster.org



Description of problem:

There is a potential leak in protocol/client's INODELK callback:

<code>
 31
 30         GF_PROTOCOL_DICT_UNSERIALIZE (this, xdata, (rsp.xdata.xdata_val),
 29                                       (rsp.xdata.xdata_len), ret,
 28                                       rsp.op_errno, out);
 27
 26         ret = client_post_inodelk (this, &rsp, &xdata);
 25         if (ret < 0)
 24                 goto out;
 23 out:
</code>

The dict xdata is unserialized twice - once at line 30 and once inside
client_post_inodelk function called at line 26. This is a memory leak. We're
safe as of today because none of the xlators on the client stack that invoke
inodelk fop (like AFR, DHT etc) pass xdata while winding it.



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list