Bug 1670334 - Some memory leaks found in GlusterFS 5.3
Summary: Some memory leaks found in GlusterFS 5.3
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: glusterd
Version: 5
Hardware: All
OS: All
unspecified
medium
Target Milestone: ---
Assignee: Atin Mukherjee
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-29 10:06 UTC by Terry Cui
Modified: 2019-07-05 08:49 UTC (History)
3 users (show)

Fixed In Version: glusterfs-7.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-05 08:49:45 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Terry Cui 2019-01-29 10:06:59 UTC
Description of problem:
In xlators\mgmt\glusterd\src\glusterd-mountbroker.c, the function make_ghadoop_mountspec() has memory leak.

I'm afraid that it could be modified like this:

int
make_ghadoop_mountspec(gf_mount_spec_t *mspec, const char *volname, char *user,
                       char *server)
{
    char *hadoop_mnt_desc = NULL;
    int ret = 0;

    ret = gf_asprintf(&hadoop_mnt_desc, hadoop_mnt_desc_template, server,
                      GF_CLIENT_PID_HADOOP, volname, user);
    if (ret == -1)
        return ret;

    ret = parse_mount_pattern_desc(mspec, hadoop_mnt_desc);
    GF_FREE(hadoop_mnt_desc);
    return ret;
}

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

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Yaniv Kaul 2019-04-27 17:16:21 UTC
Thanks for the report - would you be able to send a patch to Gluster Gerrit?
How did you find the leak?


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