diff options
author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-05-12 01:53:29 +0000 |
---|---|---|
committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-05-12 01:53:29 +0000 |
commit | bd2fda42cf77068231fe5ae32fbc755614892309 (patch) | |
tree | b4887726f5c95c67760f6595b5347b1ef4ad4813 /src | |
parent | baa119f2e2239073494993af3df7dc716f69247c (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/chanserv.c | 5 |
1 files 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<char, ChannelMode *>::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<ChannelModeParam *>(cm); + ChannelModeParam *cmp = dynamic_cast<ChannelModeParam *>(cm); if (!cmp->MinusNoArg) { |