From a29345f9c926aed1bfb31ebb1d32b305d72e8fb0 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Wed, 31 Jan 2024 21:41:25 +0100 Subject: [PATCH] http: return from httpGets2() on unhandled errors Closes: #879 In case of some errors httpGets2 waits for the next packet. In all cases of errors it should return NULL. Signed-off-by: Heinrich Schuchardt --- cups/http.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cups/http.c b/cups/http.c index c154412b17..57db33ae39 100644 --- a/cups/http.c +++ b/cups/http.c @@ -1091,6 +1091,7 @@ httpGets2(http_t *http, // I - HTTP connection continue; http->error = WSAGetLastError(); + return (NULL); } else if (WSAGetLastError() != http->error) { @@ -1113,6 +1114,7 @@ httpGets2(http_t *http, // I - HTTP connection continue; http->error = errno; + return (NULL); } else if (errno != http->error) {