diff options
author | Roger Dingledine <arma@torproject.org> | 2003-11-18 08:20:19 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-11-18 08:20:19 +0000 |
commit | ac56486bf64df4eb3264e87538ac415ce42eefd9 (patch) | |
tree | ddb0e7d6532602d991fcb6ac1d5919279063d30d /src/or/dns.c | |
parent | ec02f83f9411f5737f1e77443d282c7e3feda0e4 (diff) | |
download | tor-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.c | 3 |
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); |