From 3136e030975ad14a7d883bfd1f7dcfd520932a91 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 22 Oct 2006 00:07:20 +0000 Subject: Oops, memory leaks! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5512 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_mysql.cpp | 2 ++ src/modules/extra/m_pgsql.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') 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)); } } -- cgit v1.2.3