Browse Source

Zeroing out memory before using it can be so important.

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
13d9a660ca
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      src/core/resolv.c

+ 1
- 0
src/core/resolv.c View File

56
 	resolution = malloc ( sizeof ( *resolution ) );
56
 	resolution = malloc ( sizeof ( *resolution ) );
57
 	if ( ! resolution )
57
 	if ( ! resolution )
58
 		return -ENOMEM;
58
 		return -ENOMEM;
59
+	memset ( resolution, 0, sizeof ( *resolution ) );
59
 	async_init ( &resolution->async, &resolv_async_operations, parent );
60
 	async_init ( &resolution->async, &resolv_async_operations, parent );
60
 
61
 
61
 	/* Check for a dotted quad IP address first */
62
 	/* Check for a dotted quad IP address first */

Loading…
Cancel
Save