[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
@@ -98,14 +98,10 @@ sesInfoFree(struct cifsSesInfo *buf_to_free)
|
||||
atomic_dec(&sesInfoAllocCount);
|
||||
list_del(&buf_to_free->cifsSessionList);
|
||||
write_unlock(&GlobalSMBSeslock);
|
||||
if (buf_to_free->serverOS)
|
||||
kfree(buf_to_free->serverOS);
|
||||
if (buf_to_free->serverDomain)
|
||||
kfree(buf_to_free->serverDomain);
|
||||
if (buf_to_free->serverNOS)
|
||||
kfree(buf_to_free->serverNOS);
|
||||
if (buf_to_free->password)
|
||||
kfree(buf_to_free->password);
|
||||
kfree(buf_to_free->serverOS);
|
||||
kfree(buf_to_free->serverDomain);
|
||||
kfree(buf_to_free->serverNOS);
|
||||
kfree(buf_to_free->password);
|
||||
kfree(buf_to_free);
|
||||
}
|
||||
|
||||
@@ -144,8 +140,7 @@ tconInfoFree(struct cifsTconInfo *buf_to_free)
|
||||
atomic_dec(&tconInfoAllocCount);
|
||||
list_del(&buf_to_free->cifsConnectionList);
|
||||
write_unlock(&GlobalSMBSeslock);
|
||||
if (buf_to_free->nativeFileSystem)
|
||||
kfree(buf_to_free->nativeFileSystem);
|
||||
kfree(buf_to_free->nativeFileSystem);
|
||||
kfree(buf_to_free);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user