http2: fix push discard

- fix logic in discarding a failed pushed stream so that
  stream context is properly cleaned up

Closes #13055
This commit is contained in:
Stefan Eissing 2024-03-06 10:15:15 +01:00 committed by Daniel Stenberg
parent db5c9f4f9e
commit cc6f2f0064
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -839,9 +839,8 @@ fail:
static void discard_newhandle(struct Curl_cfilter *cf,
struct Curl_easy *newhandle)
{
if(!newhandle->req.p.http) {
if(newhandle->req.p.http) {
http2_data_done(cf, newhandle, TRUE);
newhandle->req.p.http = NULL;
}
(void)Curl_close(&newhandle);
}