Unnecessary use of memory pool for processing names within dns messages (dns_message_t)
During processing of dns requests in
lib/dns/message.c, storage for names found within the message are allocated using a memory pool with a default size of
NAME_COUNT (64), this means that even if the message contains only a single name, 64 allocations of size
sizeof(dns_name_t) will take place during the processing of the request.
This could be optimized, a simple strategy would be to allocate memory on demand, i.e. allocate memory for a name only and when a name is located in the message.