From: Holger Lubitz Date: Fri, 6 Jul 2007 19:08:29 +0000 (+0200) Subject: convert to zalloc X-Git-Tag: v0.9.3~259 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32e4ca8ae3c5989ef3d73130acff48c918ea9693;p=thirdparty%2Fipxe.git convert to zalloc --- diff --git a/src/net/netdevice.c b/src/net/netdevice.c index a5c8890e8..d72392ca0 100644 --- a/src/net/netdevice.c +++ b/src/net/netdevice.c @@ -265,9 +265,8 @@ struct net_device * alloc_netdev ( size_t priv_size ) { size_t total_len; total_len = ( sizeof ( *netdev ) + priv_size ); - netdev = malloc ( total_len ); + netdev = zalloc ( total_len ); if ( netdev ) { - memset ( netdev, 0, total_len ); netdev->refcnt.free = free_netdev; INIT_LIST_HEAD ( &netdev->tx_queue ); INIT_LIST_HEAD ( &netdev->rx_queue );