diff options
Diffstat (limited to 'src/modules/extra/m_mssql.cpp')
-rw-r--r-- | src/modules/extra/m_mssql.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/extra/m_mssql.cpp b/src/modules/extra/m_mssql.cpp index ece93ef8a..03d6e14db 100644 --- a/src/modules/extra/m_mssql.cpp +++ b/src/modules/extra/m_mssql.cpp @@ -368,13 +368,14 @@ class SQLConn : public classbase res->dbid = host.id; res->query = req.query.q; - const char* msquery = strdup(req.query.q.data()); + char* msquery = strdup(req.query.q.data()); Instance->Logs->Log("m_mssql",DEBUG,"doing Query: %s",msquery); if (tds_submit_query(sock, msquery) != TDS_SUCCEED) { std::string error("failed to execute: "+std::string(req.query.q.data())); delete[] query; delete res; + free(msquery); return SQLerror(QSEND_FAIL, error); } delete[] query; |