[9.18] Fix a use-after-free bug in dns_zonemgr_releasezone()

Arаm Sаrgsyаn requested to merge 3768-dns_zonemgr-use-after-free-v9_18 into v9_18

Backport of !7303 (merged).

Closes #3768 (closed)

Merge request reports