2
0
mirror of https://github.com/xcat2/xNBA.git synced 2025-01-19 05:53:16 +00:00

Zeroing out memory before using it can be so important.

This commit is contained in:
Michael Brown 2007-01-19 14:44:59 +00:00
parent d6909f65f0
commit 13d9a660ca

View File

@ -56,6 +56,7 @@ int resolv ( const char *name, struct sockaddr *sa, struct async *parent ) {
resolution = malloc ( sizeof ( *resolution ) );
if ( ! resolution )
return -ENOMEM;
memset ( resolution, 0, sizeof ( *resolution ) );
async_init ( &resolution->async, &resolv_async_operations, parent );
/* Check for a dotted quad IP address first */