diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2017-04-20 02:14:28 -0400 |
---|---|---|
committer | Jeff Darcy <jeff@pl.atyp.us> | 2017-04-25 15:04:09 +0000 |
commit | fb66df4c4496f19a3800e8efa39c52f77320a2fb (patch) | |
tree | 0e8b9a4e11fc339a1891bb52f835a7d856773a43 /api/src | |
parent | 6d021a281076cccd05bbf31e3d66670250edfb4a (diff) |
api: fix bad release of dict causes memory leak
Change-Id: Ic7169fd05aff7bf46108e8ac7b1f29688a7f2358
Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
Reviewed-on: https://review.gluster.org/17092
Tested-by: Poornima G <pgurusid@redhat.com>
Reviewed-by: Poornima G <pgurusid@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'api/src')
-rw-r--r-- | api/src/glfs-handleops.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/api/src/glfs-handleops.c b/api/src/glfs-handleops.c index 84dba5b82c5..69c542e5886 100644 --- a/api/src/glfs-handleops.c +++ b/api/src/glfs-handleops.c @@ -2295,13 +2295,15 @@ pub_glfs_h_acl_get (struct glfs *fs, struct glfs_object *object, goto out; ret = dict_get_str (xattr, (char *)acl_key, &acl_s); - if (ret == -1) + if (ret) goto out; acl = acl_from_text (acl_s); out: - GF_FREE (acl_s); + if (xattr) + dict_unref(xattr); + if (IA_ISLNK (object->inode->ia_type) && new_object) glfs_h_close (new_object); |