[PATCH] Validate presence of upstream pipe in ngx_http_upstream_finalize_request

Robert Paprocki rpaprocki at fearnothingproductions.net
Sat Dec 2 00:26:55 UTC 2017


# HG changeset patch
# User Robert Paprocki <robert at cryptobells.com>
# Date 1512174351 28800
#      Fri Dec 01 16:25:51 2017 -0800
# Node ID a200e7c746dc7853b051f9b357a5b9c24d6b0dd0
# Parent  fc0d06224edac2c7cfbfd9a4def478f285d9957b
Validate presence of upstream pipe in ngx_http_upstream_finalize_request

diff -r fc0d06224eda -r a200e7c746dc src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c Tue Nov 28 13:09:54 2017 +0300
+++ b/src/http/ngx_http_upstream.c Fri Dec 01 16:25:51 2017 -0800
@@ -4353,7 +4353,9 @@
             }
         }

-        ngx_http_file_cache_free(r->cache, u->pipe->temp_file);
+        if (u->pipe) {
+            ngx_http_file_cache_free(r->cache, u->pipe->temp_file);
+        }
     }

 #endif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20171201/8c4f7d48/attachment.html>


More information about the nginx-devel mailing list