From a4f06660d2d0ecbaba8120a48e027df1dc707bbc Mon Sep 17 00:00:00 2001 From: qinwei1 Date: Tue, 13 Dec 2022 23:02:39 +0800 Subject: [PATCH] fs_epoll: fix some potential issue for list operation VELAPLATFO-4690 Summary 1. delete item before free it Signed-off-by: qinwei1 Change-Id: Ie101a0cdba97caa8c3bbf0830dc0a35750688a41 --- fs/vfs/fs_epoll.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/vfs/fs_epoll.c b/fs/vfs/fs_epoll.c index 0e179cec6f..3214207b73 100644 --- a/fs/vfs/fs_epoll.c +++ b/fs/vfs/fs_epoll.c @@ -192,6 +192,7 @@ static int epoll_do_close(FAR struct file *filep) list_for_every_entry_safe(&eph->extend, epn, tmp, epoll_node_t, node) { + list_delete(&epn->node); kmm_free(epn); }