diff options
author | Kim Alvefur <zash@zash.se> | 2019-07-28 16:17:23 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-07-28 16:17:23 +0200 |
commit | 94fd1eada65f65524901ef6f5466febacf7ae2dd (patch) | |
tree | c8f0bf7495293298138f4d2583608c721f22a8db /util-src | |
parent | 7e6c27dd6bfbc5f0f1069036b28828805bf9d300 (diff) | |
download | prosody-94fd1eada65f65524901ef6f5466febacf7ae2dd.tar.gz prosody-94fd1eada65f65524901ef6f5466febacf7ae2dd.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')
-rw-r--r-- | util-src/poll.c | 2 |
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); |