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:
parent
fcdc7afcb5
commit
86d602f734
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user