File cups-2.2.7-CVE-2023-34241.patch of Package cups.29369

--- scheduler/client.c.orig	2018-03-23 04:48:36.000000000 +0100
+++ scheduler/client.c	2023-06-12 14:00:31.399775059 +0200
@@ -195,13 +195,10 @@ cupsdAcceptClient(cupsd_listener_t *lis)
    /*
     * Can't have an unresolved IP address with double-lookups enabled...
     */
-
-    httpClose(con->http);
-
     cupsdLogClient(con, CUPSD_LOG_WARN,
-                    "Name lookup failed - connection from %s closed!",
+                    "Name lookup failed - closing connection from %s!",
                     httpGetHostname(con->http, NULL, 0));
-
+    httpClose(con->http);
     free(con);
     return;
   }
@@ -236,12 +233,10 @@ cupsdAcceptClient(cupsd_listener_t *lis)
       * Can't have a hostname that doesn't resolve to the same IP address
       * with double-lookups enabled...
       */
-
-      httpClose(con->http);
-
       cupsdLogClient(con, CUPSD_LOG_WARN,
-                      "IP lookup failed - connection from %s closed!",
+                      "IP lookup failed - closing connection from %s!",
                       httpGetHostname(con->http, NULL, 0));
+      httpClose(con->http);
       free(con);
       return;
     }
@@ -258,11 +253,10 @@ cupsdAcceptClient(cupsd_listener_t *lis)
 
   if (!hosts_access(&wrap_req))
   {
-    httpClose(con->http);
-
     cupsdLogClient(con, CUPSD_LOG_WARN,
                     "Connection from %s refused by /etc/hosts.allow and "
 		    "/etc/hosts.deny rules.", httpGetHostname(con->http, NULL, 0));
+    httpClose(con->http);
     free(con);
     return;
   }
openSUSE Build Service is sponsored by