mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-30 02:51:33 +08:00
[LWIP] fixed select issues: pollset need clean.
This commit is contained in:
parent
a2d1f21b43
commit
108a1434cd
@ -52,7 +52,7 @@ int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struc
|
||||
/* Allocate the descriptor list for poll() */
|
||||
if (npfds > 0)
|
||||
{
|
||||
pollset = (struct pollfd *)rt_malloc(npfds * sizeof(struct pollfd));
|
||||
pollset = (struct pollfd *)rt_calloc(npfds, sizeof(struct pollfd));
|
||||
if (!pollset)
|
||||
{
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user