diff options
Diffstat (limited to 'src/kernel/vfs')
-rw-r--r-- | src/kernel/vfs/backend.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/kernel/vfs/backend.c b/src/kernel/vfs/backend.c index 0f684a0..58819fd 100644 --- a/src/kernel/vfs/backend.c +++ b/src/kernel/vfs/backend.c @@ -1,3 +1,4 @@ +#include <kernel/mem/alloc.h> #include <kernel/panic.h> #include <kernel/proc.h> #include <kernel/vfs/backend.h> @@ -49,7 +50,10 @@ _Noreturn void vfs_backend_finish(struct vfs_op_request *req, int ret) { }, }; ret = handle; - } + } + + if (req->op.type == VFSOP_OPEN) + kfree(req->op.open.path); req->caller->state = PS_RUNNING; regs_savereturn(&req->caller->regs, ret); |