Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--uloop.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/uloop.c b/uloop.c
index deb08a3..9a0590f 100644
--- a/uloop.c
+++ b/uloop.c
@@ -392,15 +392,16 @@ int uloop_fd_delete(struct uloop_fd *fd)
{
int i;
- if (!fd->registered)
- return 0;
-
for (i = 0; i < cur_nfds; i++) {
if (cur_fds[cur_fd + i].fd != fd)
continue;
cur_fds[cur_fd + i].fd = NULL;
}
+
+ if (!fd->registered)
+ return 0;
+
fd->registered = false;
uloop_fd_stack_event(fd, -1);
return __uloop_fd_delete(fd);