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:
parent
bc0fe0ea16
commit
a4f06660d2
@ -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_for_every_entry_safe(&eph->extend, epn, tmp, epoll_node_t, node)
|
||||||
{
|
{
|
||||||
|
list_delete(&epn->node);
|
||||||
kmm_free(epn);
|
kmm_free(epn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user