aboutsummaryrefslogtreecommitdiffstats
path: root/util-src/poll.c
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-07-28 16:17:23 +0200
committerKim Alvefur <zash@zash.se>2019-07-28 16:17:23 +0200
commitd8ab361f15526623860ccd6ab9ca90451f638736 (patch)
treec8f0bf7495293298138f4d2583608c721f22a8db /util-src/poll.c
parent9e57e0279736a1ec952d4915b02735b14ddb6d19 (diff)
downloadprosody-d8ab361f15526623860ccd6ab9ca90451f638736.tar.gz
prosody-d8ab361f15526623860ccd6ab9ca90451f638736.zip
util.poll: Add missing return statements in fallback mode
These allowed modifying or deleting select() state for unregistered FDs. During normal usage this should never happen. Modifying one that isn't set might cause weirdness but deleting an already deleted FD isn't a problem.
Diffstat (limited to 'util-src/poll.c')
-rw-r--r--util-src/poll.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/util-src/poll.c b/util-src/poll.c
index 1e7b6da3..21cb9581 100644
--- a/util-src/poll.c
+++ b/util-src/poll.c
@@ -172,6 +172,7 @@ static int Lset(lua_State *L) {
lua_pushnil(L);
lua_pushstring(L, strerror(ENOENT));
lua_pushinteger(L, ENOENT);
+ return 3;
}
if(!lua_isnoneornil(L, 3)) {
@@ -229,6 +230,7 @@ static int Ldel(lua_State *L) {
lua_pushnil(L);
lua_pushstring(L, strerror(ENOENT));
lua_pushinteger(L, ENOENT);
+ return 3;
}
FD_CLR(fd, &state->wantread);