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-06-18 01:25:18 +02:00
parent 7872b890fe
commit 2b9fb513f4

View File

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