php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch fpm-dangling-pointer for FPM related Bug #72055

Patch version 2016-04-19 08:28 UTC

Return to Bug #72055 | Download this patch
Patch Revisions:

Developer: r@v2u.org

diff --git a/sapi/fpm/fpm/fastcgi.c b/sapi/fpm/fpm/fastcgi.c
index 8b081b2..f925515 100755
--- a/sapi/fpm/fpm/fastcgi.c
+++ b/sapi/fpm/fpm/fastcgi.c
@@ -1070,7 +1070,7 @@ int fcgi_finish_request(fcgi_request *req, int force_close)
 {
        int ret = 1;

-       if (req->fd >= 0) {
+       if (req && req->fd >= 0) {
                if (!req->closed) {
                        ret = fcgi_flush(req, 1);
                        req->closed = 1;
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 17:01:29 2024 UTC