about ipmr

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

 



excuse me for my english bad :) !

alloc_netdev func can return NULL and I think that is
not right to use dev pointer in this case without a
test.
so maybe it is better ? !

---------------------------------------------

--- knl_src/net/ipv4/ipmr.c	2003-11-25
16:02:59.000000000 -0300
+++ ipmr_patch.c	2004-01-08 10:21:22.000000000 -0300
@@ -205,7 +205,7 @@
 	dev = alloc_netdev(sizeof(struct net_device_stats),
"pimreg",
 			   reg_vif_setup);
 
-	if (register_netdevice(dev)) {
+	if (dev&&register_netdevice(dev)) {
 		kfree(dev);
 		return NULL;
 	}

----------------------------------------------

sorry if is a dumb question and thanks for atention

pub  1024D/5139533E Joilnen Batista Leite 
F565 BD0B 1A39 390D 827E  03E5 0CD4 0F20 5139 533E


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux