From 52671661f8fdca0b61aec8009b4bc7de9bc00166 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 2 Apr 2008 18:45:54 +0000 Subject: DOH! Fix my muppetry of a segfault, and fix some warnings git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9273 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/socketengines/socketengine_kqueue.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/socketengines/socketengine_kqueue.cpp') diff --git a/src/socketengines/socketengine_kqueue.cpp b/src/socketengines/socketengine_kqueue.cpp index 5fabb5b8d..f21d2e710 100644 --- a/src/socketengines/socketengine_kqueue.cpp +++ b/src/socketengines/socketengine_kqueue.cpp @@ -22,8 +22,9 @@ KQueueEngine::KQueueEngine(InspIRCd* Instance) : SocketEngine(Instance) { this->RecoverFromFork(); - ref = new EventHandler* [GetMaxFds()]; ke_list = new struct kevent[GetMaxFds()]; + ref = new EventHandler* [GetMaxFds()]; + memset(ref, 0, GetMaxFds() * sizeof(EventHandler*)); } void KQueueEngine::RecoverFromFork() @@ -43,7 +44,6 @@ void KQueueEngine::RecoverFromFork() ServerInstance->Exit(EXIT_STATUS_SOCKETENGINE); } CurrentSetSize = 0; - memset(ref, 0, GetMaxFds() * sizeof(EventHandler*)); } KQueueEngine::~KQueueEngine() -- cgit v1.2.3