From a4d3476e0e41c4472aae26d9f39f9e3fedf9f837 Mon Sep 17 00:00:00 2001 From: Holger Lubitz Date: Fri, 6 Jul 2007 21:08:54 +0200 Subject: [PATCH] convert to zalloc --- src/net/udp/dhcp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/net/udp/dhcp.c b/src/net/udp/dhcp.c index 81454b06..07dd923b 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 );