summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2009-03-27 18:20:49 +0000
committerpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2009-03-27 18:20:49 +0000
commit40747ee2ad5621d5cc0d8afe59d1f36c2b191711 (patch)
tree084fa1b92547c9749a99e831b06fd25c2c008ae8 /src/modules
parent01fac25f1654299c53d721adc3481d4a5601eacf (diff)
Fix potential crash on uninitialised var
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11267 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_mysql.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp
index d0716bd90..824a75e46 100644
--- a/src/modules/extra/m_mysql.cpp
+++ b/src/modules/extra/m_mysql.cpp
@@ -773,6 +773,7 @@ void DispatcherThread::Run()
LoadDatabases(Parent->Conf, Parent->PublicServerInstance, Parent);
}
+ conn = NULL;
Parent->ConnMutex.Lock();
for (ConnMap::iterator i = Connections.begin(); i != Connections.end(); i++)
{
@@ -806,9 +807,10 @@ void DispatcherThread::Run()
void DispatcherThread::OnNotify()
{
+ SQLConnection* conn;
while (1)
{
- SQLConnection* conn = NULL;
+ conn = NULL;
Parent->ConnMutex.Lock();
for (ConnMap::iterator iter = Connections.begin(); iter != Connections.end(); iter++)
{