Fix bug in 405 ethernet driver; allocated data not cleared!
diff --git a/cpu/ppc4xx/405gp_enet.c b/cpu/ppc4xx/405gp_enet.c
index 572af62..9d8e2b6 100644
--- a/cpu/ppc4xx/405gp_enet.c
+++ b/cpu/ppc4xx/405gp_enet.c
@@ -944,6 +944,7 @@
"Cannot allocate eth_device %d\n", eth_num);
return (-1);
}
+ memset(dev, 0, sizeof(*dev));
/* Allocate our private use data */
hw = (EMAC_405_HW_PST) malloc (sizeof (*hw));
if (hw == NULL) {
@@ -953,6 +954,7 @@
free (dev);
return (-1);
}
+ memset(hw, 0, sizeof(*hw));
switch (eth_num) {
case 0: