summaryrefslogtreecommitdiff
path: root/src/kernel/vfs/request.c
diff options
context:
space:
mode:
authordzwdz2021-09-12 13:00:20 +0200
committerdzwdz2021-09-12 13:00:20 +0200
commit625ae265cbabe76bd272e9e8f0f637635af64b23 (patch)
tree6edecc8fa0053fc4fda0d079fbc1f3bdaac6fe7e /src/kernel/vfs/request.c
parente65d58357aaff7c1d05c06753538383478c1b0e9 (diff)
vfs_request refactor pt2
Diffstat (limited to 'src/kernel/vfs/request.c')
-rw-r--r--src/kernel/vfs/request.c4
1 files changed, 2 insertions, 2 deletions
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);