Bug 1196027 - Fix memory leak while using scandir
Summary: Fix memory leak while using scandir
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: snapshot
Version: mainline
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Saravanakumar
QA Contact:
URL:
Whiteboard: SNAPSHOT
Depends On:
Blocks: 1218562
TreeView+ depends on / blocked
 
Reported: 2015-02-25 06:34 UTC by Saravanakumar
Modified: 2016-06-16 12:42 UTC (History)
6 users (show)

Fixed In Version: glusterfs-3.8rc2
Clone Of:
: 1218562 (view as bug list)
Environment:
Last Closed: 2016-06-16 12:42:14 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Saravanakumar 2015-02-25 06:34:45 UTC
Description of problem:

scandir allocates memory for dirent entries.
once dirent entries are used, free them appropriately.

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


How reproducible:
-

Steps to Reproduce:
-

Actual results:
Corresponding dirent entries are freed.

Expected results:


Additional info:
Please refer man scandir for more info.

Comment 1 Anand Avati 2015-02-25 06:38:44 UTC
REVIEW: http://review.gluster.org/9739 (glusterd/snapshot: Fix memory leak while using scandir) posted (#2) for review on master by Saravanakumar Arumugam (sarumuga)

Comment 2 Anand Avati 2015-04-16 18:26:52 UTC
COMMIT: http://review.gluster.org/9739 committed in master by Vijay Bellur (vbellur) 
------
commit 56a04936f29a21b7bd277b4b9dc92fea01730c2e
Author: Saravanakumar Arumugam <sarumuga>
Date:   Wed Feb 25 11:43:14 2015 +0530

    glusterd/snapshot: Fix memory leak while using scandir
    
    scandir allocates memory for dirent entries.
    Ensure to free them up once they are used.
    
    Noticed this while looking for a sample scandir implementation.
    
    Change-Id: Iff5f76e93e698d3f454f273d9dd7d9a15cf63953
    BUG: 1196027
    Signed-off-by: Saravanakumar Arumugam <sarumuga>
    Reviewed-on: http://review.gluster.org/9739
    Reviewed-by: Sachin Pandit <spandit>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Rajesh Joseph <rjoseph>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 3 Nagaprasad Sathyanarayana 2015-10-25 14:58:19 UTC
Fix for this BZ is already present in a GlusterFS release. You can find clone of this BZ, fixed in a GlusterFS release and closed. Hence closing this mainline BZ as well.

Comment 4 Niels de Vos 2016-06-16 12:42:14 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.8.0, please open a new bug report.

glusterfs-3.8.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


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