From 625ae265cbabe76bd272e9e8f0f637635af64b23 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sun, 12 Sep 2021 13:00:20 +0200 Subject: vfs_request refactor pt2 --- src/kernel/vfs/request.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/kernel/vfs/request.c') diff --git a/src/kernel/vfs/request.c b/src/kernel/vfs/request.c index 1212aa4..a275fd6 100644 --- a/src/kernel/vfs/request.c +++ b/src/kernel/vfs/request.c @@ -57,8 +57,8 @@ _Noreturn void vfs_request_finish(struct vfs_request *req, int ret) { ret = handle; } - if (req->type == VFSOP_OPEN) - kfree(req->open.path); + if (req->input.kern) kfree(req->input.buf_kern); + if (req->output.kern) kfree(req->output.buf_kern); req->caller->state = PS_RUNNING; regs_savereturn(&req->caller->regs, ret); -- cgit v1.2.3