X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fext3%2Facl.c;h=638c13a26c0375dc5536fe44e51963c1cf217040;hb=f7f1b0f1e2fbadeab12d24236000e778aa9b1ead;hp=926af622c53b9bf29af8af20f26b1487f3791e96;hpb=e3f6fb6212a7102bdb56ba38fa1e98fe72950475;p=linux-2.6.git diff --git a/fs/ext3/acl.c b/fs/ext3/acl.c index 926af622c..638c13a26 100644 --- a/fs/ext3/acl.c +++ b/fs/ext3/acl.c @@ -197,8 +197,7 @@ ext3_get_acl(struct inode *inode, int type) acl = NULL; else acl = ERR_PTR(retval); - if (value) - kfree(value); + kfree(value); if (!IS_ERR(acl)) { switch(type) { @@ -267,8 +266,7 @@ ext3_set_acl(handle_t *handle, struct inode *inode, int type, error = ext3_xattr_set_handle(handle, inode, name_index, "", value, size, 0); - if (value) - kfree(value); + kfree(value); if (!error) { switch(type) { case ACL_TYPE_ACCESS: @@ -288,6 +286,8 @@ ext3_check_acl(struct inode *inode, int mask) { struct posix_acl *acl = ext3_get_acl(inode, ACL_TYPE_ACCESS); + if (IS_ERR(acl)) + return PTR_ERR(acl); if (acl) { int error = posix_acl_permission(inode, acl, mask); posix_acl_release(acl);