summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilly Tarreau <w@1wt.eu>2021-10-19 11:29:21 +0200
committerWilly Tarreau <w@1wt.eu>2021-10-20 15:14:13 +0200
commitc1ab34d2cf8049c95ece6d5bef20b6e967a6d235 (patch)
tree9a61f9234da4409a5984d944d58dfa206491fc9c
parentc90363c9ad40341a8c9653b4e8ab6a6a1ced2224 (diff)
downloadhaproxy-c1ab34d2cf8049c95ece6d5bef20b6e967a6d235.tar.gz
CLEANUP: always initialize the answer_list
Similar to the previous patch, the answer's list was only initialized the first time it was added to a list, leading to bogus outdated pointer to appear when debugging code is added around it to watch it. Let's make sure it's always initialized upon allocation.
-rw-r--r--src/resolvers.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/resolvers.c b/src/resolvers.c
index 8551c085f..6f1858640 100644
--- a/src/resolvers.c
+++ b/src/resolvers.c
@@ -982,6 +982,7 @@ static int resolv_validate_dns_response(unsigned char *resp, unsigned char *bufe
answer_record->ar_item = NULL;
answer_record->last_seen = TICK_ETERNITY;
LIST_INIT(&answer_record->attached_servers);
+ LIST_INIT(&answer_record->list);
offset = 0;
len = resolv_read_name(resp, bufend, reader, tmpname, DNS_MAX_NAME_SIZE, &offset, 0);