$OpenBSD: patch-apc_cache_c,v 1.1 2012/05/01 02:25:21 william Exp $

Fix pollution of the slots table with unoccupied slots
(upstream commit r311376)


--- apc_cache.c.orig	Fri Mar 16 15:57:39 2012
+++ apc_cache.c	Fri Mar 16 15:58:35 2012
@@ -1290,7 +1290,9 @@ zval* apc_cache_info(apc_cache_t* cache, zend_bool lim
                 add_next_index_zval(list, link);
                 j++;
             }
-            add_next_index_long(slots, j);
+            if(j != 0) {
+                add_next_index_long(slots, j);
+            }
         }
 
         /* For each slot pending deletion */
