]> granicus.if.org Git - php/commitdiff
fix crash on restarting static PHP having session modules loaded
authorStanislav Malyshev <stas@php.net>
Tue, 20 Sep 2005 14:01:40 +0000 (14:01 +0000)
committerStanislav Malyshev <stas@php.net>
Tue, 20 Sep 2005 14:01:40 +0000 (14:01 +0000)
ext/session/session.c

index 36fd5eeb16ffbbf259b8d6929286f69a4378b0ea..a0d1a5e1332973108055f20b5f1eb8687dc8f630 100644 (file)
@@ -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;
 }