# HG changeset patch # User Kim Alvefur # Date 1564323443 -7200 # Node ID 46a7792fdac55af7828b509ed2975cdc21be33fd # Parent a3c66d0294e1816e723c926ce759c55ce496c493 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. diff -r a3c66d0294e1 -r 46a7792fdac5 util-src/poll.c --- a/util-src/poll.c Sun Jul 28 01:43:10 2019 +0200 +++ b/util-src/poll.c Sun Jul 28 16:17:23 2019 +0200 @@ -172,6 +172,7 @@ lua_pushnil(L); lua_pushstring(L, strerror(ENOENT)); lua_pushinteger(L, ENOENT); + return 3; } if(!lua_isnoneornil(L, 3)) { @@ -229,6 +230,7 @@ lua_pushnil(L); lua_pushstring(L, strerror(ENOENT)); lua_pushinteger(L, ENOENT); + return 3; } FD_CLR(fd, &state->wantread);