diff options
| author | Michael Brown | 2007-01-19 15:44:59 +0100 |
|---|---|---|
| committer | Michael Brown | 2007-01-19 15:44:59 +0100 |
| commit | 13d9a660ca0d77fe9efcb401f53de01470033444 (patch) | |
| tree | 24e59a19b1aca2fa2c89a6bb437b490d02d3a670 | |
| parent | Actually, it's probably safer *not* to leave child processes hanging (diff) | |
| download | ipxe-13d9a660ca0d77fe9efcb401f53de01470033444.tar.gz ipxe-13d9a660ca0d77fe9efcb401f53de01470033444.tar.xz ipxe-13d9a660ca0d77fe9efcb401f53de01470033444.zip | |
Zeroing out memory before using it can be so important.
| -rw-r--r-- | src/core/resolv.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/resolv.c b/src/core/resolv.c index 52ad4b630..b2fbc93d0 100644 --- a/src/core/resolv.c +++ b/src/core/resolv.c @@ -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 */ |
