]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
http2: fix push discard
authorStefan Eissing <stefan@eissing.org>
Wed, 6 Mar 2024 09:15:15 +0000 (10:15 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 6 Mar 2024 13:34:21 +0000 (14:34 +0100)
- fix logic in discarding a failed pushed stream so that
  stream context is properly cleaned up

Closes #13055

lib/http2.c

index cb765b54b5adc7499a13a62f32f6873a529b6e72..c63ecd38371ab4c16aadda06028667833f4eb028 100644 (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);
 }