From f1c9fd9134e3b20d5d19b63ffd27982d010f962b Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Tue, 20 Sep 2005 14:01:40 +0000 Subject: [PATCH] fix crash on restarting static PHP having session modules loaded --- ext/session/session.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/session/session.c b/ext/session/session.c index 36fd5eeb16..a0d1a5e133 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -178,6 +178,7 @@ static ps_serializer ps_serializers[MAX_SERIALIZERS + 1] = { }; #define MAX_MODULES 10 +#define PREDEFINED_MODULES 2 static ps_module *ps_modules[MAX_MODULES + 1] = { ps_files_ptr, @@ -1727,6 +1728,7 @@ PHP_MSHUTDOWN_FUNCTION(session) #ifdef HAVE_LIBMM PHP_MSHUTDOWN(ps_mm) (SHUTDOWN_FUNC_ARGS_PASSTHRU); #endif + memset(&ps_modules[PREDEFINED_MODULES], 0, (MAX_MODULES-PREDEFINED_MODULES)*sizeof(ps_module *)); return SUCCESS; } -- 2.40.0