diff options
author | Jesper Juhl <juhl-lkml@dif.dk> | 2005-04-04 09:59:56 -0400 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2005-05-05 06:42:27 -0400 |
commit | 251c8427c9c418674fc3c04a11de95dc3661b560 (patch) | |
tree | b67bab32762a4a64083de64281b1249bccfd9402 /fs/ntfs/dir.c | |
parent | 53d59aad9326199ef5749c97513db498309a057e (diff) |
NTFS: Remove checks for NULL before calling kfree() since kfree() does the
checking itself. (Jesper Juhl)
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Diffstat (limited to 'fs/ntfs/dir.c')
-rw-r--r-- | fs/ntfs/dir.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/ntfs/dir.c b/fs/ntfs/dir.c index 95c44577160c..a56ca1821eed 100644 --- a/fs/ntfs/dir.c +++ b/fs/ntfs/dir.c | |||
@@ -183,8 +183,7 @@ found_it: | |||
183 | name->len = 0; | 183 | name->len = 0; |
184 | *res = name; | 184 | *res = name; |
185 | } else { | 185 | } else { |
186 | if (name) | 186 | kfree(name); |
187 | kfree(name); | ||
188 | *res = NULL; | 187 | *res = NULL; |
189 | } | 188 | } |
190 | mref = le64_to_cpu(ie->data.dir.indexed_file); | 189 | mref = le64_to_cpu(ie->data.dir.indexed_file); |
@@ -444,8 +443,7 @@ found_it2: | |||
444 | name->len = 0; | 443 | name->len = 0; |
445 | *res = name; | 444 | *res = name; |
446 | } else { | 445 | } else { |
447 | if (name) | 446 | kfree(name); |
448 | kfree(name); | ||
449 | *res = NULL; | 447 | *res = NULL; |
450 | } | 448 | } |
451 | mref = le64_to_cpu(ie->data.dir.indexed_file); | 449 | mref = le64_to_cpu(ie->data.dir.indexed_file); |
@@ -1462,10 +1460,8 @@ err_out: | |||
1462 | unlock_page(ia_page); | 1460 | unlock_page(ia_page); |
1463 | ntfs_unmap_page(ia_page); | 1461 | ntfs_unmap_page(ia_page); |
1464 | } | 1462 | } |
1465 | if (ir) | 1463 | kfree(ir); |
1466 | kfree(ir); | 1464 | kfree(name); |
1467 | if (name) | ||
1468 | kfree(name); | ||
1469 | if (ctx) | 1465 | if (ctx) |
1470 | ntfs_attr_put_search_ctx(ctx); | 1466 | ntfs_attr_put_search_ctx(ctx); |
1471 | if (m) | 1467 | if (m) |