Messages in this thread Patch in this message | | | Date | Fri, 25 Mar 2005 21:19:36 +0100 (CET) | From | Jesper Juhl <> | Subject | [PATCH] redundant NULL check before kfree cleanup for fs/afs/ |
| |
kfree() handles NULL pointers just fine, checking first is not needed.
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
diff -upr linux-2.6.12-rc1-mm3-orig/fs/afs/file.c linux-2.6.12-rc1-mm3/fs/afs/file.c --- linux-2.6.12-rc1-mm3-orig/fs/afs/file.c 2005-03-25 15:28:58.000000000 +0100 +++ linux-2.6.12-rc1-mm3/fs/afs/file.c 2005-03-25 20:55:17.000000000 +0100 @@ -308,8 +308,7 @@ static int afs_file_releasepage(struct p page->private = 0; ClearPagePrivate(page); - if (pageio) - kfree(pageio); + kfree(pageio); } _leave(" = 0");
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |