[PATCH] redundant NULL check before kfree cleanup for fs/afs/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



kfree() handles NULL pointers just fine, checking first is not needed.


Signed-off-by: Jesper Juhl <[email protected]>

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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux