diff options
Diffstat (limited to 'api/src')
-rw-r--r-- | api/src/glfs-handleops.c | 6 | ||||
-rw-r--r-- | api/src/glfs-resolve.c | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/api/src/glfs-handleops.c b/api/src/glfs-handleops.c index a464b2ed195..b5fcfab713c 100644 --- a/api/src/glfs-handleops.c +++ b/api/src/glfs-handleops.c @@ -2297,13 +2297,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); diff --git a/api/src/glfs-resolve.c b/api/src/glfs-resolve.c index f8b437bab0e..d495cd21413 100644 --- a/api/src/glfs-resolve.c +++ b/api/src/glfs-resolve.c @@ -385,6 +385,9 @@ priv_glfs_resolve_at (struct glfs *fs, xlator_t *subvol, inode_t *at, int ret = -1; struct iatt ciatt = {0, }; + DECLARE_OLD_THIS; + __GLFS_ENTRY_VALIDATE_FS(fs, invalid_fs); + path = gf_strdup (origpath); if (!path) { errno = ENOMEM; @@ -510,9 +513,10 @@ priv_glfs_resolve_at (struct glfs *fs, xlator_t *subvol, inode_t *at, } out: GF_FREE (path); + __GLFS_EXIT_FS; /* do NOT loc_wipe here as only last component might be missing */ - +invalid_fs: return ret; } |