summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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));
}
}