We generally handle NULL pointers in free() and friends gracefully.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23578 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2008-01-17 08:06:54 +00:00
parent 72fa2c51eb
commit 06958f901c
+3
View File
@@ -709,6 +709,9 @@ object_cache_return_to_slab(object_cache *cache, slab *source, void *object)
void
object_cache_free(object_cache *cache, void *object)
{
if (object == NULL)
return;
// flags are read only.
if (!(cache->flags & CACHE_NO_DEPOT)) {
if (object_depot_store(&cache->depot, object))