diff --git a/[refs] b/[refs] index 1ff96ec61aac..90dbc6c05246 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1cd9cd161c89f569b90583b7797bd972c3bf0cff +refs/heads/master: 6c6a426fdcb374b7641d7cf9eea88410828b9d9a diff --git a/trunk/fs/nfsd/vfs.c b/trunk/fs/nfsd/vfs.c index aa1d0d6489a1..9609eb51d727 100644 --- a/trunk/fs/nfsd/vfs.c +++ b/trunk/fs/nfsd/vfs.c @@ -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) @@ -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