aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xattr.c
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2005-11-07 04:01:34 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 10:54:06 -0500
commitf99d49adf527fa6f7a9c42257fa76bca6b8df1e3 (patch)
tree41dddbc336016f9dc9557cdb15300de5e599dac1 /fs/xattr.c
parent6044ec8882c726e325017bd948aa0cd94ad33abc (diff)
[PATCH] kfree cleanup: fs
This is the fs/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in fs/. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/xattr.c')
-rw-r--r--fs/xattr.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/xattr.c b/fs/xattr.c
index f6e00c0e114f..a9db22557998 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -74,8 +74,7 @@ setxattr(struct dentry *d, char __user *name, void __user *value,
74 } 74 }
75out: 75out:
76 up(&d->d_inode->i_sem); 76 up(&d->d_inode->i_sem);
77 if (kvalue) 77 kfree(kvalue);
78 kfree(kvalue);
79 return error; 78 return error;
80} 79}
81 80
@@ -173,8 +172,7 @@ getxattr(struct dentry *d, char __user *name, void __user *value, size_t size)
173 error = -E2BIG; 172 error = -E2BIG;
174 } 173 }
175out: 174out:
176 if (kvalue) 175 kfree(kvalue);
177 kfree(kvalue);
178 return error; 176 return error;
179} 177}
180 178
@@ -259,8 +257,7 @@ listxattr(struct dentry *d, char __user *list, size_t size)
259 error = -E2BIG; 257 error = -E2BIG;
260 } 258 }
261out: 259out:
262 if (klist) 260 kfree(klist);
263 kfree(klist);
264 return error; 261 return error;
265} 262}
266 263