summaryrefslogtreecommitdiff
path: root/src/or/dns.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2003-11-18 08:20:19 +0000
committerRoger Dingledine <arma@torproject.org>2003-11-18 08:20:19 +0000
commitac56486bf64df4eb3264e87538ac415ce42eefd9 (patch)
treeddb0e7d6532602d991fcb6ac1d5919279063d30d /src/or/dns.c
parentec02f83f9411f5737f1e77443d282c7e3feda0e4 (diff)
downloadtor-ac56486bf64df4eb3264e87538ac415ce42eefd9.tar.gz
tor-ac56486bf64df4eb3264e87538ac415ce42eefd9.zip
use the tor_malloc_zero wrapper
svn:r837
Diffstat (limited to 'src/or/dns.c')
-rw-r--r--src/or/dns.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/or/dns.c b/src/or/dns.c
index 1199f7cc7c..94dd0dd72d 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -127,8 +127,7 @@ int dns_resolve(connection_t *exitconn) {
return -1;
}
} else { /* need to add it */
- resolve = tor_malloc(sizeof(struct cached_resolve));
- memset(resolve, 0, sizeof(struct cached_resolve));
+ resolve = tor_malloc_zero(sizeof(struct cached_resolve));
resolve->state = CACHE_STATE_PENDING;
resolve->expire = now + 15*60; /* 15 minutes */
strncpy(resolve->question, exitconn->address, MAX_ADDRESSLEN);