Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1218562

Summary: Fix memory leak while using scandir
Product: [Community] GlusterFS Reporter: rjoseph
Component: snapshotAssignee: bugs <bugs>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.7.0CC: amukherj, asengupt, bugs, gluster-bugs, sarumuga, spandit
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: SNAPSHOT
Fixed In Version: glusterfs-3.7.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1196027 Environment:
Last Closed: 2015-05-15 17:09:35 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: 1196027    
Bug Blocks:    

Description rjoseph 2015-05-05 09:22:02 UTC
+++ This bug was initially created as a clone of Bug #1196027 +++

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.

--- Additional comment from Anand Avati on 2015-02-25 01:38:44 EST ---

REVIEW: http://review.gluster.org/9739 (glusterd/snapshot: Fix memory leak while using scandir) posted (#2) for review on master by Saravanakumar Arumugam (sarumuga)

--- Additional comment from Anand Avati on 2015-04-16 14:26:52 EDT ---

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 1 Anand Avati 2015-05-06 09:19:03 UTC
REVIEW: http://review.gluster.org/10559 (glusterd/snapshot: Fix memory leak while using scandir) posted (#2) for review on release-3.7 by Vijay Bellur (vbellur)

Comment 2 Niels de Vos 2015-05-15 17:09:35 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.7.0, please open a new bug report.

glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user