Description: Applies security patch for CVE-2022-23634
Author: Mohammed Bilal <mdbilal@disroot.org>
Applied-Upstream: https://github.com/puma/puma/pull/2822
Last-Update: 2022-04-08
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/lib/puma/server.rb
+++ b/lib/puma/server.rb
@@ -873,11 +873,14 @@
         end
 
       ensure
-        uncork_socket client
+        begin
+          uncork_socket client
 
-        body.close
-        req.tempfile.unlink if req.tempfile
-        res_body.close if res_body.respond_to? :close
+          body.close
+          req.tempfile.unlink if req.tempfile
+        ensure
+          res_body.close if res_body.respond_to? :close
+        end
 
         after_reply.each { |o| o.call }
       end
