file_cache_delete() can now safely be used with a NULL pointer.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9938 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2004-11-12 16:46:05 +00:00
parent 0c7e169a8c
commit eb9f0103f8
+6 -3
View File
@@ -1,7 +1,7 @@
/*
** Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
** Distributed under the terms of the Haiku License.
*/
* Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#include "vnode_store.h"
@@ -466,6 +466,9 @@ file_cache_delete(void *_cacheRef)
{
file_cache_ref *ref = (file_cache_ref *)_cacheRef;
if (ref == NULL)
return;
vfs_vnode_release_ref(ref->device);
delete ref;
}