[Bugs] [Bug 1218562] New: Fix memory leak while using scandir

bugzilla at redhat.com bugzilla at redhat.com
Tue May 5 09:22:02 UTC 2015


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

            Bug ID: 1218562
           Summary: Fix memory leak while using scandir
           Product: GlusterFS
           Version: 3.7.0
         Component: snapshot
          Severity: medium
          Assignee: bugs at gluster.org
          Reporter: rjoseph at redhat.com
                CC: amukherj at redhat.com, bugs at gluster.org,
                    gluster-bugs at redhat.com, sarumuga at redhat.com,
                    spandit at redhat.com
        Depends On: 1196027



+++ 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 at redhat.com)

--- 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 at redhat.com) 
------
commit 56a04936f29a21b7bd277b4b9dc92fea01730c2e
Author: Saravanakumar Arumugam <sarumuga at redhat.com>
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 at redhat.com>
    Reviewed-on: http://review.gluster.org/9739
    Reviewed-by: Sachin Pandit <spandit at redhat.com>
    Tested-by: Gluster Build System <jenkins at build.gluster.com>
    Reviewed-by: Rajesh Joseph <rjoseph at redhat.com>
    Reviewed-by: Vijay Bellur <vbellur at redhat.com>


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1196027
[Bug 1196027] Fix memory leak while using scandir
-- 
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