+ remove-redundant-null-checks-before-free-in-net.patch added to -mm tree

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

 



The patch titled

     Remove redundant NULL checks before [kv]free - in net/

has been added to the -mm tree.  Its filename is

     remove-redundant-null-checks-before-free-in-net.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this


From: Jesper Juhl <jesper.juhl@xxxxxxxxx>

Redundant NULL check before kfree removal from net/

Signed-off-by: Jesper Juhl <jesper.juhl@xxxxxxxxx>
Acked-by: James Morris <jmorris@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 net/ipv4/ipcomp.c     |    7 ++-----
 net/tipc/name_distr.c |    3 +--
 2 files changed, 3 insertions(+), 7 deletions(-)

diff -puN net/ipv4/ipcomp.c~remove-redundant-null-checks-before-free-in-net net/ipv4/ipcomp.c
--- devel/net/ipv4/ipcomp.c~remove-redundant-null-checks-before-free-in-net	2006-04-17 21:28:12.000000000 -0700
+++ devel-akpm/net/ipv4/ipcomp.c	2006-04-17 21:28:12.000000000 -0700
@@ -290,11 +290,8 @@ static void ipcomp_free_scratches(void)
 	if (!scratches)
 		return;
 
-	for_each_possible_cpu(i) {
-		void *scratch = *per_cpu_ptr(scratches, i);
-		if (scratch)
-			vfree(scratch);
-	}
+	for_each_possible_cpu(i)
+		vfree(*per_cpu_ptr(scratches, i));
 
 	free_percpu(scratches);
 }
diff -puN net/tipc/name_distr.c~remove-redundant-null-checks-before-free-in-net net/tipc/name_distr.c
--- devel/net/tipc/name_distr.c~remove-redundant-null-checks-before-free-in-net	2006-04-17 21:28:12.000000000 -0700
+++ devel-akpm/net/tipc/name_distr.c	2006-04-17 21:28:12.000000000 -0700
@@ -229,8 +229,7 @@ static void node_is_down(struct publicat
 				     publ->node, publ->ref, publ->key);
         assert(p == publ);
 	write_unlock_bh(&tipc_nametbl_lock);
-	if (publ)
-		kfree(publ);
+	kfree(publ);
 }
 
 /**
_

Patches currently in -mm which might be from jesper.juhl@xxxxxxxxx are

git-mtd.patch
small-whitespace-cleanup-for-qlogic-driver.patch
reduce-nr-of-ptr-derefs-in-fs-jffs2-summaryc.patch
voyager-no-need-to-define-bits_per_byte-when-its-already-in-typesh.patch
fix-potential-null-pointer-deref-in-gen_init_cpio.patch
debug-shared-irqs.patch
remove-redundant-null-checks-before-free-in-fs.patch
remove-redundant-null-checks-before-free-in-net.patch
remove-redundant-null-checks-before-free-in-arch.patch
remove-redundant-null-checks-before-free-in-kernel.patch
remove-redundant-null-checks-before-free-in-drivers.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux