resolved: fix refcounting DnsScope's conflict_queue
authorDmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Wed, 3 Jan 2018 12:26:53 +0000 (14:26 +0200)
committerDmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Wed, 3 Jan 2018 13:04:20 +0000 (15:04 +0200)
commit432d108c25a9705f1564d7620c38cdf890df40ba
tree0981e34f59bc648ec14ce07753848a4999c0cc13
parent8481e3e71e704a10af0b6d53d4b015b2b8e1e16b
resolved: fix refcounting DnsScope's conflict_queue

Refcounting for a RR's key is done separately from refcounting
for the RR itself, but in dns_scope_notify_conflict() we don't
do that. This may lead to a situation when a RR key put in the
conflict_queue hash as a value's key gets freed upon
cache reduction when it's still referenced by the hash.

Thus increase refcount for the key when putting it into the hash
and unreference it upon removing from the hash.

Closes #6456
src/resolve/resolved-dns-scope.c