]> git.ipfire.org Git - thirdparty/bind9.git/commit
Use sizeof(*ptr) for allocating/freeing memory in forward.c
authorAram Sargsyan <aram@isc.org>
Mon, 12 Dec 2022 09:20:48 +0000 (09:20 +0000)
committerArаm Sаrgsyаn <aram@isc.org>
Wed, 11 Jan 2023 13:42:09 +0000 (13:42 +0000)
commit39cc597022ee95408eb905dba3abbb8b3d0bf223
treeb44bb9ecfd040ea91b2fb5035e1e4dac8f7eb28c
parent64c8e6394285918d7cdbeb8a2af862275f999763
Use sizeof(*ptr) for allocating/freeing memory in forward.c

As shown in the previous commit, using sizeof(type_t) is a little
bit more error-prone when copy-pasting code, so extracting the
size information from the pointer which is being dealt with seems
like a better alternative.

(cherry picked from commit cf4003fa5801230a7e844e2abe5878520a58a748)
lib/dns/forward.c