The double-free may have happened in some cases when the upstream
resolver was stopped while answering a forwarded query. I was reliably
reproducing it by running resperf on two kresd instances with one forwarded
to the other, and killing the upstream one.
Bugfixes
--------
- daemon/http: improved URI checks to fix some proxies (#746, !1311)
+- daemon/tls: fixed a double-free for some cases of policy.TLS_FORWARD (!1314)
Knot Resolver 5.5.1 (2022-06-14)
/* Store the current session data for potential resumption of this session */
if (ctx->params) {
gnutls_free(ctx->params->session_data.data);
+ ctx->params->session_data.data = NULL;
+ ctx->params->session_data.size = 0;
gnutls_session_get_data2(ctx->c.tls_session, &ctx->params->session_data);
}