I'm afraid that DoH in 6.0.x is in much worse trouble than just memleaks; see:
https://gitlab.nic.cz/knot/knot-resolver/-/issues/931