summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authoraozima <[email protected]>2017-12-14 17:02:39 +0800
committeraozima <[email protected]>2017-12-14 17:04:56 +0800
commit108a1434cd7a11894aea8b563f090ca289e1b762 (patch)
treef95357ce7c1066c3e4655f3eb3177050f6fb82ba /components
parenta2d1f21b43c8613848f025b5a9fbe77a5031641e (diff)
[LWIP] fixed select issues: pollset need clean.
Diffstat (limited to 'components')
-rw-r--r--components/dfs/src/select.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/dfs/src/select.c b/components/dfs/src/select.c
index 36a8942331..c727763991 100644
--- a/components/dfs/src/select.c
+++ b/components/dfs/src/select.c
@@ -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;