From 0fa87e1ab1697cb3b39e3a5663f97dc15cf8d98f Mon Sep 17 00:00:00 2001 From: Ben Fuhrmannek Date: Mon, 24 Nov 2014 15:26:50 +0100 Subject: extra null check for old startup handler. (#70) --- suhosin.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/suhosin.c b/suhosin.c index b186fbb..8ce279d 100644 --- a/suhosin.c +++ b/suhosin.c @@ -211,7 +211,7 @@ static void suhosin_shutdown(zend_extension *extension) static int suhosin_startup_wrapper(zend_extension *ext) { - int res; + int res = SUCCESS; zend_extension *ex = &suhosin_zend_extension_entry; char *new_info; int new_info_length; @@ -244,7 +244,9 @@ static int suhosin_startup_wrapper(zend_extension *ext) ze->op_array_dtor = stealth_op_array_dtor; /*}*/ - res = old_startup(ext); + if (old_startup != NULL) { + res = old_startup(ext); + } /* ex->name = NULL; ex->author = NULL; -- cgit v1.3