diff options
-rw-r--r-- | src/socketengines/socketengine_poll.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/socketengines/socketengine_poll.cpp b/src/socketengines/socketengine_poll.cpp index 8a1ae6b9a..d6ae59334 100644 --- a/src/socketengines/socketengine_poll.cpp +++ b/src/socketengines/socketengine_poll.cpp @@ -21,11 +21,13 @@ PollEngine::PollEngine(InspIRCd* Instance) : SocketEngine(Instance) { // Poll requires no special setup (which is nice). CurrentSetSize = 0; + MAX_DESCRIPTORS = 0; ref = new EventHandler* [GetMaxFds()]; events = new struct pollfd[GetMaxFds()]; - memset(&events, 0, GetMaxFds() * sizeof(struct pollfd*)); + memset(events, 0, GetMaxFds() * sizeof(struct pollfd)); + memset(ref, 0, GetMaxFds() * sizeof(EventHandler*)); } PollEngine::~PollEngine() |