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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user