lkml.org 
[lkml]   [2004]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectabout ipmr
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
-
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-03-22 13:59    [W:0.109 / U:0.816 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site