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:
Thanks for the report - would you be able to send a patch to Gluster Gerrit? How did you find the leak?
https://review.gluster.org/#/c/glusterfs/+/22619/5/xlators/mgmt/glusterd/src/glusterd-mountbroker.c covers this part.