slab: add CLEANUP_KFREE
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
36145eafbc
commit
b838b53942
2 changed files with 8 additions and 0 deletions
|
|
@ -105,3 +105,9 @@ void slab_free(mem_cache_t *cache, void *ptr)
|
|||
|
||||
spinlock_release(&cache->lock);
|
||||
}
|
||||
|
||||
void _cleanup_kfree(void **ptr)
|
||||
{
|
||||
if (ptr && *ptr)
|
||||
kfree(ptr);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue