2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-14 15:21:32 +00:00

convert to zalloc

This commit is contained in:
Holger Lubitz 2007-07-06 21:08:54 +02:00
parent 389c63d7c4
commit a4d3476e0e

View File

@ -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 );