summaryrefslogtreecommitdiffstats
path: root/22786c74700c1f0da7747ccea128e6400f0ce289.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-09-19 09:17:35 +0200
committerRemi Collet <remi@remirepo.net>2017-09-19 09:17:35 +0200
commit824933da5fe84784984fb9e2b9bdf39f9c18a3d5 (patch)
tree85a0a4f5ec416300dcea78aaff4c18b183b9c84d /22786c74700c1f0da7747ccea128e6400f0ce289.patch
parent8070c3b6d9828e48cd3419cd3bc4e7ab8bc3e26f (diff)
add upstream patch to fix segfaults
Diffstat (limited to '22786c74700c1f0da7747ccea128e6400f0ce289.patch')
-rw-r--r--22786c74700c1f0da7747ccea128e6400f0ce289.patch46
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));
+ }
+