From 8f4722144288313ad4163b2dd4cabe0ae129e548 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 22 May 2026 07:49:06 +0000 Subject: [PATCH] CLEANUP: resolvers: remove pool_free(NULL) in SRV additional record matching In resolv_validate_dns_response(), when matching an additional A/AAAA record to an SRV record, the code checked tmp_record->ar_item == NULL then called pool_free(resolv_answer_item_pool, tmp_record->ar_item). This is a copy-paste mistake from similar patterns elsewhere since the pointer is confirmed to be NULL a few lines above, so let's just drop the confusing pool_free. --- src/resolvers.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/resolvers.c b/src/resolvers.c index 335706613..09441bccd 100644 --- a/src/resolvers.c +++ b/src/resolvers.c @@ -1597,7 +1597,6 @@ static int resolv_validate_dns_response(unsigned char *resp, unsigned char *bufe tmp_record->ar_item == NULL && memcmp(tmp_record->data.target, answer_record->name, tmp_record->data_len) == 0) { /* Always use the received additional record to refresh info */ - pool_free(resolv_answer_item_pool, tmp_record->ar_item); tmp_record->ar_item = answer_record; answer_record = NULL; break;