aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/misc.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/cifs/misc.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/cifs/misc.c')
-rw-r--r--fs/cifs/misc.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index eba1de917f2a..34a06692e4fa 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -98,14 +98,10 @@ sesInfoFree(struct cifsSesInfo *buf_to_free)
98 atomic_dec(&sesInfoAllocCount); 98 atomic_dec(&sesInfoAllocCount);
99 list_del(&buf_to_free->cifsSessionList); 99 list_del(&buf_to_free->cifsSessionList);
100 write_unlock(&GlobalSMBSeslock); 100 write_unlock(&GlobalSMBSeslock);
101 if (buf_to_free->serverOS) 101 kfree(buf_to_free->serverOS);
102 kfree(buf_to_free->serverOS); 102 kfree(buf_to_free->serverDomain);
103 if (buf_to_free->serverDomain) 103 kfree(buf_to_free->serverNOS);
104 kfree(buf_to_free->serverDomain); 104 kfree(buf_to_free->password);
105 if (buf_to_free->serverNOS)
106 kfree(buf_to_free->serverNOS);
107 if (buf_to_free->password)
108 kfree(buf_to_free->password);
109 kfree(buf_to_free); 105 kfree(buf_to_free);
110} 106}
111 107
@@ -144,8 +140,7 @@ tconInfoFree(struct cifsTconInfo *buf_to_free)
144 atomic_dec(&tconInfoAllocCount); 140 atomic_dec(&tconInfoAllocCount);
145 list_del(&buf_to_free->cifsConnectionList); 141 list_del(&buf_to_free->cifsConnectionList);
146 write_unlock(&GlobalSMBSeslock); 142 write_unlock(&GlobalSMBSeslock);
147 if (buf_to_free->nativeFileSystem) 143 kfree(buf_to_free->nativeFileSystem);
148 kfree(buf_to_free->nativeFileSystem);
149 kfree(buf_to_free); 144 kfree(buf_to_free);
150} 145}
151 146