tcp_netpoll: add assert into tcp_pollsetup when pollinfo invalid

In order to expose similar problems quickly in the future

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
zhanghongyu 2022-11-11 17:38:11 +08:00 committed by Petro Karashchenko
parent fcdc7afcb5
commit 86d602f734

View File

@ -226,6 +226,7 @@ int tcp_pollsetup(FAR struct socket *psock, FAR struct pollfd *fds)
{ {
if (++info >= &conn->pollinfo[CONFIG_NET_TCP_NPOLLWAITERS]) if (++info >= &conn->pollinfo[CONFIG_NET_TCP_NPOLLWAITERS])
{ {
DEBUGPANIC();
ret = -ENOMEM; ret = -ENOMEM;
goto errout_with_lock; goto errout_with_lock;
} }