vfs: fix logic errors and leaks in vfs_open

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-07-02 14:09:41 +02:00
commit dd00e79b18
3 changed files with 69 additions and 22 deletions

View file

@ -12,6 +12,17 @@ void list_create(list_t *list)
list->tail = NULL;
}
void list_destroy(list_t *list)
{
list_item_t *item = list->head;
while (item) {
list_item_t *next = item->next;
slab_free(list_cache, item);
item = next;
}
}
list_item_t *list_insert(list_t *list, void *item)
{
spinlock_acquire(&list->lock);