diff options
Diffstat (limited to 'evdns.c')
-rw-r--r-- | evdns.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1265,6 +1265,8 @@ reply_parse(struct evdns_base *base, u8 *packet, int length) struct request *req = NULL; unsigned int i, buf_size; + memset(&reply, 0, sizeof(reply)); + ASSERT_LOCKED(base); GET16(trans_id); @@ -1280,8 +1282,6 @@ reply_parse(struct evdns_base *base, u8 *packet, int length) if (!req) return -1; EVUTIL_ASSERT(req->base == base); - memset(&reply, 0, sizeof(reply)); - /* If it's not an answer, it doesn't correspond to any request. */ if (!(flags & _QR_MASK)) return -1; /* must be an answer */ if ((flags & (_RCODE_MASK|_TC_MASK)) && (flags & (_RCODE_MASK|_TC_MASK)) != DNS_ERR_NOTEXIST) { |