From 3af30531af39f4b3687ff7c6265ddb01b82b593c Mon Sep 17 00:00:00 2001 From: peavey Date: Sun, 16 Mar 2008 21:25:30 +0000 Subject: OK that should fix it for fail too. And make it compile again. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9109 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_mssql.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3