The unlinking of the new Curl_peer was happening too later after
the struct had been set to zero. Move the unlink to happen before
that.
Fixes #21602
Reported-by: Joshua Rogers
Closes #21627
}
Curl_bufq_free(&ctx->inbufq);
Curl_bufq_free(&ctx->outbufq);
+ Curl_peer_unlink(&ctx->dest);
tunnel_stream_clear(&ctx->tunnel);
memset(ctx, 0, sizeof(*ctx));
ctx->call_data = save;
{
if(ctx) {
cf_h2_proxy_ctx_clear(ctx);
- Curl_peer_unlink(&ctx->dest);
curlx_free(ctx);
}
}