]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
http2: cleanup pushed newhandle on fail
authorStefan Eissing <stefan@eissing.org>
Wed, 8 Oct 2025 10:28:14 +0000 (12:28 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 9 Oct 2025 06:42:49 +0000 (08:42 +0200)
When nghttp2_session_set_stream_user_data() fails, clean up the
new handle.

Reported-by: Joshua Rogers
Closes #18931

lib/http2.c

index ff53fc4b947dc97b0085532f9f33c8f395ba8801..43f4e9106cafeb1ca1165f425ac2e24667825ca3 100644 (file)
@@ -1030,6 +1030,7 @@ static int push_promise(struct Curl_cfilter *cf,
       infof(data, "failed to set user_data for stream %u",
             newstream->id);
       DEBUGASSERT(0);
+      discard_newhandle(cf, newhandle);
       rv = CURL_PUSH_DENY;
       goto fail;
     }