diff options
Diffstat (limited to 'src/kernel/vfs')
-rw-r--r-- | src/kernel/vfs/request.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/kernel/vfs/request.c b/src/kernel/vfs/request.c index 0c763b3..e3f0316 100644 --- a/src/kernel/vfs/request.c +++ b/src/kernel/vfs/request.c @@ -60,9 +60,10 @@ void vfsreq_finish(VfsReq *req, char __user *stored, long ret, /* delegating - moving a handle to the caller */ assert(handler); h = hs_take(handler->hs, ret); - // TODO!!! no null check - h->readable = h->readable && OPEN_READABLE(req->flags); - h->writeable = h->writeable && OPEN_WRITEABLE(req->flags); + if (h) { + h->readable = h->readable && OPEN_READABLE(req->flags); + h->writeable = h->writeable && OPEN_WRITEABLE(req->flags); + } } if (h) { |