summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-10-22 00:07:20 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-10-22 00:07:20 +0000
commit3136e030975ad14a7d883bfd1f7dcfd520932a91 (patch)
tree1152ece7a669507c8c189b990a6ff8a4ac0478a8
parent208c3ab61128911b80d25549b896f3cd5eea6497 (diff)
Oops, memory leaks!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5512 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/extra/m_mysql.cpp2
-rw-r--r--src/modules/extra/m_pgsql.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp
index 3dadd5873..a3b247f56 100644
--- a/src/modules/extra/m_mysql.cpp
+++ b/src/modules/extra/m_mysql.cpp
@@ -530,6 +530,8 @@ class SQLConnection : public classbase
* Pass them this connection id as what to examine
*/
+ delete[] query;
+
NotifyMainThread(this);
}
diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp
index e1f7d8900..1bd19e964 100644
--- a/src/modules/extra/m_pgsql.cpp
+++ b/src/modules/extra/m_pgsql.cpp
@@ -1168,13 +1168,13 @@ SQLerror SQLConn::DoQuery(SQLrequest &req)
{
Instance->Log(DEBUG, "Dispatched query successfully");
qinprog = true;
- DELETE(query);
+ delete[] query;
return SQLerror();
}
else
{
Instance->Log(DEBUG, "Failed to dispatch query: %s", PQerrorMessage(sql));
- DELETE(query);
+ delete[] query;
return SQLerror(QSEND_FAIL, PQerrorMessage(sql));
}
}