]> git.ipfire.org Git - thirdparty/bind9.git/commit
dig: add reference counter to the dig_lookup_t object
authorOndřej Surý <ondrej@sury.org>
Thu, 5 Nov 2020 14:22:38 +0000 (15:22 +0100)
committerOndřej Surý <ondrej@sury.org>
Sat, 7 Nov 2020 20:11:42 +0000 (21:11 +0100)
commit6d63ffe46d2abd604a91123ca8cd69f98eae361f
tree66b60f9544430c3143f5a94c20464ef1e6de2e45
parentecd70eb4b54992ff21d47095fcdc18f2b3123444
dig: add reference counter to the dig_lookup_t object

Sometimes, the dig_lookup_t could be destroyed before the final
send_done() callback was be called, leading to dereferencing an
already freed dig_lookup_t object.  By making the dig_lookup_t
reference counted, we are ensuring that it won't be freed until
the last reference (from dig_query_t .lookup) is released.
bin/dig/dighost.c
bin/dig/dighost.h
bin/dig/nslookup.c