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
7872b890fe
commit
2b9fb513f4
@ -460,10 +460,9 @@ static int dns_resolv ( struct resolv_interface *resolv,
|
||||
}
|
||||
|
||||
/* Allocate DNS structure */
|
||||
dns = malloc ( sizeof ( *dns ) );
|
||||
dns = zalloc ( sizeof ( *dns ) );
|
||||
if ( ! dns )
|
||||
return -ENOMEM;
|
||||
memset ( dns, 0, sizeof ( *dns ) );
|
||||
resolv_init ( &dns->resolv, &null_resolv_ops, &dns->refcnt );
|
||||
xfer_init ( &dns->socket, &dns_socket_operations, &dns->refcnt );
|
||||
dns->timer.expired = dns_timer_expired;
|
||||
|
Loading…
Reference in New Issue
Block a user