lkml.org 
[lkml]   [2005]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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/

\
 
 \ /
  Last update: 2005-04-06 13:30    [W:0.038 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site