From 3f5d32426764221c19dbca3503b2906606d430e9 Mon Sep 17 00:00:00 2001 From: vsfos Date: Mon, 31 Jul 2023 21:42:54 +0800 Subject: [PATCH] [shell/linux] fix __vsf_linux_fd_get_ex --- source/shell/sys/linux/kernel/fs/vsf_linux_fs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/shell/sys/linux/kernel/fs/vsf_linux_fs.c b/source/shell/sys/linux/kernel/fs/vsf_linux_fs.c index f422ede9a..21b5c51e5 100644 --- a/source/shell/sys/linux/kernel/fs/vsf_linux_fs.c +++ b/source/shell/sys/linux/kernel/fs/vsf_linux_fs.c @@ -767,9 +767,8 @@ vsf_linux_fd_t * __vsf_linux_fd_get_ex(vsf_linux_process_t *process, int fd) { if (NULL == process) { process = vsf_linux_get_cur_process(); - VSF_LINUX_ASSERT(process != NULL); #if VSF_LINUX_USE_VFORK == ENABLED - if (process->is_vforking) { + if ((process != NULL) && (process->is_vforking)) { process = process->vfork_child; } #endif