com php-src: Don't keep dangling pointers: sapi/cgi/cgi_main .c sapi/litespeed/lsapi_main.c

From: Date: Wed, 23 Sep 2015 13:16:04 +0000
Subject: com php-src: Don't keep dangling pointers: sapi/cgi/cgi_main .c sapi/litespeed/lsapi_main.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89132@lists.php.net to get a copy of this message
Commit: 01ed736827f637cb2a6d2402a2a29e8b4a0d7124 Author: Dmitry Stogov <dmitry@zend.com> Wed, 23 Sep 2015 16:16:04 +0300 Parents: 77b9acd32601b6ea6582a69696d328e251c32e92 Branches: PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=01ed736827f637cb2a6d2402a2a29e8b4a0d7124 Log: Don't keep dangling pointers Changed paths: M sapi/cgi/cgi_main.c M sapi/litespeed/lsapi_main.c Diff: diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index e76da2a..6293470 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -2353,7 +2353,10 @@ consult the installation file that came with this distribution, or visit \n\ goto fastcgi_request_done; } - if (SG(request_info).path_translated) efree(SG(request_info).path_translated); + if (SG(request_info).path_translated) { + efree(SG(request_info).path_translated); + SG(request_info).path_translated = NULL; + } if (free_query_string && SG(request_info).query_string) { free(SG(request_info).query_string); @@ -2487,7 +2490,10 @@ consult the installation file that came with this distribution, or visit \n\ fastcgi_request_done: { - if (SG(request_info).path_translated) efree(SG(request_info).path_translated); + if (SG(request_info).path_translated) { + efree(SG(request_info).path_translated); + SG(request_info).path_translated = NULL; + } php_request_shutdown((void *) 0); diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c index e58587d..13bca0c 100644 --- a/sapi/litespeed/lsapi_main.c +++ b/sapi/litespeed/lsapi_main.c @@ -173,6 +173,7 @@ static int sapi_lsapi_deactivate(void) if ( SG(request_info).path_translated ) { efree( SG(request_info).path_translated ); + SG(request_info).path_translated = NULL; } return SUCCESS;

« previous php.cvs (#89132) next »