Index: sal/rtl/source/alloc_cache.c
===================================================================
RCS file: /cvs/porting/sal/rtl/source/alloc_cache.c,v
retrieving revision 1.2
diff -u -r1.2 alloc_cache.c
--- sal/rtl/source/alloc_cache.c	2 May 2006 12:11:54 -0000	1.2
+++ sal/rtl/source/alloc_cache.c	25 Jul 2006 07:57:10 -0000
@@ -1274,7 +1282,18 @@
 			curr = cache->m_cpu_curr;
 			if ((curr != 0) && (curr->m_mag_used < curr->m_mag_size))
 			{
+				int i;
+				for (i = 0; i < curr->m_mag_used; ++i)
+				{
+					OSL_ENSURE(curr->m_objects[i] != obj, "DOUBLE FREE!");
+					if (curr->m_objects[i] == obj)
+					{
+						RTL_MEMORY_LOCK_RELEASE(&(cache->m_depot_lock));
+						return;
+					}
+
+				}
 				curr->m_objects[curr->m_mag_used++] = obj;
 				cache->m_cpu_stats.m_free += 1;
 				RTL_MEMORY_LOCK_RELEASE(&(cache->m_depot_lock));
 
