fs_epoll: fix some potential issue for list operation

VELAPLATFO-4690

Summary
1. delete item before free it

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
Change-Id: Ie101a0cdba97caa8c3bbf0830dc0a35750688a41
This commit is contained in:
qinwei1 2022-12-13 23:02:39 +08:00 committed by Petro Karashchenko
parent bc0fe0ea16
commit a4f06660d2

View File

@ -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);
}