Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 117191
b: refs/heads/master
c: 6c6a426
h: refs/heads/master
i:
  117189: 83182e7
  117187: cd2fc87
  117183: 70be868
v: v3
  • Loading branch information
Krishna Kumar authored and J. Bruce Fields committed Oct 22, 2008
1 parent 738aa0a commit a142f06
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1cd9cd161c89f569b90583b7797bd972c3bf0cff
refs/heads/master: 6c6a426fdcb374b7641d7cf9eea88410828b9d9a
6 changes: 5 additions & 1 deletion trunk/fs/nfsd/vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,
static ssize_t nfsd_getxattr(struct dentry *dentry, char *key, void **buf)
{
ssize_t buflen;
ssize_t ret;

buflen = vfs_getxattr(dentry, key, NULL, 0);
if (buflen <= 0)
Expand All @@ -419,7 +420,10 @@ static ssize_t nfsd_getxattr(struct dentry *dentry, char *key, void **buf)
if (!*buf)
return -ENOMEM;

return vfs_getxattr(dentry, key, *buf, buflen);
ret = vfs_getxattr(dentry, key, *buf, buflen);
if (ret < 0)
kfree(*buf);
return ret;
}
#endif

Expand Down

0 comments on commit a142f06

Please sign in to comment.