diff options
Diffstat (limited to '22786c74700c1f0da7747ccea128e6400f0ce289.patch')
-rw-r--r-- | 22786c74700c1f0da7747ccea128e6400f0ce289.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/22786c74700c1f0da7747ccea128e6400f0ce289.patch b/22786c74700c1f0da7747ccea128e6400f0ce289.patch new file mode 100644 index 0000000..6043250 --- /dev/null +++ b/22786c74700c1f0da7747ccea128e6400f0ce289.patch @@ -0,0 +1,46 @@ +From 22786c74700c1f0da7747ccea128e6400f0ce289 Mon Sep 17 00:00:00 2001 +From: neeke <neeke@php.net> +Date: Tue, 19 Sep 2017 14:27:06 +0800 +Subject: [PATCH] Fixed #152 (Segfault in cli) + +--- + src/Request.c | 23 +++++++++++++++++------ + 1 file changed, 17 insertions(+), 6 deletions(-) + +diff --git a/src/Request.c b/src/Request.c +index 57f14f0..1817219 100644 +--- a/src/Request.c ++++ b/src/Request.c +@@ -180,15 +180,26 @@ static int seaslog_init_request_variable(TSRMLS_D) + + static void seaslog_clear_request_variable(TSRMLS_D) + { +- SEASLOG_ZVAL_PTR_DTOR(SEASLOG_G(request_variable)->request_uri); +- +- if( SEASLOG_G(request_variable)->request_method ) ++ if(SEASLOG_G(request_variable)->request_uri) ++ { ++ SEASLOG_ZVAL_PTR_DTOR(SEASLOG_G(request_variable)->request_uri); ++ } ++ ++ if(SEASLOG_G(request_variable)->request_method) + { + SEASLOG_ZVAL_PTR_DTOR(SEASLOG_G(request_variable)->request_method); + } +- +- efree(SEASLOG_G(request_variable)->domain_port); +- efree(SEASLOG_G(request_variable)->client_ip); ++ ++ if(SEASLOG_G(request_variable)->domain_port) ++ { ++ efree(SEASLOG_G(request_variable)->domain_port); ++ } ++ ++ if(SEASLOG_G(request_variable)->client_ip) ++ { ++ efree(SEASLOG_G(request_variable)->client_ip); ++ } ++ + efree(SEASLOG_G(request_variable)); + } + |