summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
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 );