[Bugs] [Bug 1670334] New: Some memory leaks found in GlusterFS 5.3

bugzilla at redhat.com bugzilla at redhat.com
Tue Jan 29 10:06:59 UTC 2019


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

            Bug ID: 1670334
           Summary: Some memory leaks found in GlusterFS 5.3
           Product: GlusterFS
           Version: 5
          Hardware: All
                OS: All
            Status: NEW
         Component: core
          Severity: medium
          Assignee: bugs at gluster.org
          Reporter: i_chips at qq.com
                CC: bugs at gluster.org
  Target Milestone: ---
    Classification: Community



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:

-- 
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