Skip to content

Commit 661338d

Browse files
authored
Merge pull request #1473 from Bluebear233/patch-1
[DFS] Update net_sockets.c
2 parents 45bd118 + ec81f44 commit 661338d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

components/dfs/filesystems/net/net_sockets.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,16 @@ int socket(int domain, int type, int protocol)
320320
rt_list_init(&(lwsock->wait_head));
321321
lwsock->conn->callback = event_callback;
322322
}
323+
else
324+
{
325+
/* release fd */
326+
fd_put(d);
327+
fd_put(d);
328+
329+
rt_set_errno(-ENOMEM);
330+
331+
return -1;
332+
}
323333

324334
/* release the ref-count of fd */
325335
fd_put(d);

0 commit comments

Comments
 (0)