summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHolger Lubitz2007-07-06 21:08:54 +0200
committerHolger Lubitz2007-07-06 21:08:54 +0200
commita4d3476e0e41c4472aae26d9f39f9e3fedf9f837 (patch)
tree57a474fd7ad03bcd4f7fa48153930f875d60516f /src
parentconvert to zalloc (diff)
downloadipxe-a4d3476e0e41c4472aae26d9f39f9e3fedf9f837.tar.gz
ipxe-a4d3476e0e41c4472aae26d9f39f9e3fedf9f837.tar.xz
ipxe-a4d3476e0e41c4472aae26d9f39f9e3fedf9f837.zip
convert to zalloc
Diffstat (limited to 'src')
-rw-r--r--src/net/udp/dhcp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/net/udp/dhcp.c b/src/net/udp/dhcp.c
index 81454b061..07dd923b1 100644
--- a/src/net/udp/dhcp.c
+++ b/src/net/udp/dhcp.c
@@ -787,10 +787,9 @@ int start_dhcp ( struct job_interface *job, struct net_device *netdev,
int rc;
/* Allocate and initialise structure */
- dhcp = malloc ( sizeof ( *dhcp ) );
+ dhcp = zalloc ( sizeof ( *dhcp ) );
if ( ! dhcp )
return -ENOMEM;
- memset ( dhcp, 0, sizeof ( *dhcp ) );
dhcp->refcnt.free = dhcp_free;
job_init ( &dhcp->job, &dhcp_job_operations, &dhcp->refcnt );
xfer_init ( &dhcp->xfer, &dhcp_xfer_operations, &dhcp->refcnt );