From bd2fda42cf77068231fe5ae32fbc755614892309 Mon Sep 17 00:00:00 2001 From: Adam- Date: Wed, 12 May 2010 01:53:29 +0000 Subject: [PATCH] Fixed a potential crash caused from accessing a uninitialized pointer when enforcing mlock git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2951 5417fbe8-f217-4b02-8779-1006273d7864 --- src/chanserv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/chanserv.c b/src/chanserv.c index a99066b86..4df46d1ef 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -289,7 +289,6 @@ void check_modes(Channel *c) time_t t = time(NULL); ChannelInfo *ci; ChannelMode *cm; - ChannelModeParam *cmp; std::map::iterator it; std::string param, ciparam; @@ -340,7 +339,7 @@ void check_modes(Channel *c) /* Add the eventual parameter and modify the Channel structure */ if (cm->Type == MODE_PARAM) { - if (ci->GetParam(cmp->Name, param)) + if (ci->GetParam(cm->Name, param)) c->SetMode(NULL, cm, param); } else @@ -370,7 +369,7 @@ void check_modes(Channel *c) /* Add the eventual parameter */ if (cm->Type == MODE_PARAM) { - cmp = dynamic_cast(cm); + ChannelModeParam *cmp = dynamic_cast(cm); if (!cmp->MinusNoArg) {