this will ensure the data are set to 0 (list as example)

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagn...@jcrosoft.com>
---
 drivers/net/tap.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/tap.c b/drivers/net/tap.c
index 5c3a1e3..d5c7031 100644
--- a/drivers/net/tap.c
+++ b/drivers/net/tap.c
@@ -76,7 +76,7 @@ int tap_probe(struct device_d *dev)
        struct tap_priv *priv;
        int ret = 0;
 
-       priv = xmalloc(sizeof(struct tap_priv));
+       priv = xzalloc(sizeof(struct tap_priv));
        priv->name = "barebox";
 
        priv->fd = tap_alloc(priv->name);
@@ -85,7 +85,7 @@ int tap_probe(struct device_d *dev)
                goto out;
        }
 
-       edev = xmalloc(sizeof(struct eth_device));
+       edev = xzalloc(sizeof(struct eth_device));
        edev->priv = priv;
        edev->parent = dev;
 
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to