patch-1.3.25 linux/drivers/net/dummy.c
Next file: linux/drivers/net/eepro.c
Previous file: linux/drivers/net/depca.c
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
Thu Sep 7 17:11:47 1995
- Orig file:
v1.3.24/linux/drivers/net/dummy.c
- Orig date:
Mon Jan 23 10:38:28 1995
diff -u --recursive --new-file v1.3.24/linux/drivers/net/dummy.c linux/drivers/net/dummy.c
@@ -88,6 +88,8 @@
#if DUMMY_STATS
dev->priv = kmalloc(sizeof(struct enet_statistics), GFP_KERNEL);
+ if (dev->priv == NULL)
+ return -ENOMEM;
memset(dev->priv, 0, sizeof(struct enet_statistics));
dev->get_stats = dummy_get_stats;
#endif
@@ -170,6 +172,8 @@
else
{
unregister_netdev(&dev_dummy);
+ kfree(dev_dummy.priv);
+ dev_dummy.priv = NULL;
}
}
#endif /* MODULE */
FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen, [email protected]
with Sam's (original) version of this