[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>
This commit is contained in:
committed by
Linus Torvalds
parent
6044ec8882
commit
f99d49adf5
@@ -74,8 +74,7 @@ setxattr(struct dentry *d, char __user *name, void __user *value,
|
||||
}
|
||||
out:
|
||||
up(&d->d_inode->i_sem);
|
||||
if (kvalue)
|
||||
kfree(kvalue);
|
||||
kfree(kvalue);
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -173,8 +172,7 @@ getxattr(struct dentry *d, char __user *name, void __user *value, size_t size)
|
||||
error = -E2BIG;
|
||||
}
|
||||
out:
|
||||
if (kvalue)
|
||||
kfree(kvalue);
|
||||
kfree(kvalue);
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -259,8 +257,7 @@ listxattr(struct dentry *d, char __user *list, size_t size)
|
||||
error = -E2BIG;
|
||||
}
|
||||
out:
|
||||
if (klist)
|
||||
kfree(klist);
|
||||
kfree(klist);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user