Suricata before 8.0.7 has a DoH2 type confusion that can cause an invalid free, because cleanup code for the HTTP2 state is executed even though the actual state is HTTP1 (when there is a DoH2 request with an HTTP1 to HTTP2 upgrade). This requires app-layer.protocols.doh2 to be enabled, which is the default in 8.x versions.
https://github.com/OISF/suricata/compare/suricata-8.0.6...suricata-8.0.7
https://github.com/OISF/suricata/commit/e574009add9c208f319e1d9d15b3bb1229c88074