]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
http2: only do the *done() cleanups for HTTP
authorDaniel Stenberg <daniel@haxx.se>
Fri, 3 Jul 2020 22:10:04 +0000 (00:10 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 3 Jul 2020 23:13:50 +0000 (01:13 +0200)
Follow-up to ef86daf4d3

Closes #5650
Fixes #5646

lib/http2.c

index ea75d7f1f050dbf4e0f052de1f3f60ba070ed854..e81dc8d013a01701843c5cbb6460bacc37ccf1bc 100644 (file)
@@ -1174,7 +1174,8 @@ void Curl_http2_done(struct Curl_easy *data, bool premature)
     http->push_headers = NULL;
   }
 
-  if(!httpc->h2) /* not HTTP/2 ? */
+  if(!(data->conn->handler->protocol&PROTO_FAMILY_HTTP) ||
+     !httpc->h2) /* not HTTP/2 ? */
     return;
 
   if(premature) {