Index: /trunk/xcache.c
===================================================================
--- /trunk/xcache.c	(revision 501)
+++ /trunk/xcache.c	(revision 502)
@@ -1649,5 +1649,4 @@
 		xc_php_caches = NULL;
 	}
-	xc_php_hcache.size = 0;
 
 	if (xc_var_caches) {
@@ -1655,5 +1654,4 @@
 		xc_var_caches = NULL;
 	}
-	xc_var_hcache.size = 0;
 
 	if (shm) {
@@ -1734,5 +1732,5 @@
 	}
 
-	if (xc_var_hcache.size && !XG(var_holds)) {
+	if (xc_initized && xc_var_hcache.size && !XG(var_holds)) {
 		XG(var_holds) = calloc(xc_var_hcache.size, sizeof(xc_stack_t));
 		for (i = 0; i < xc_var_hcache.size; i ++) {
