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:
parent
389c63d7c4
commit
a4d3476e0e
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user