diff options
Diffstat (limited to 'src/modules/extra/m_mssql.cpp')
-rw-r--r-- | src/modules/extra/m_mssql.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/extra/m_mssql.cpp b/src/modules/extra/m_mssql.cpp index 5128693c7..74886863d 100644 --- a/src/modules/extra/m_mssql.cpp +++ b/src/modules/extra/m_mssql.cpp @@ -294,6 +294,9 @@ class SQLConn : public classbase SQLerror Query(SQLrequest &req) { + if (!sock) + return SQLerror(BAD_CONN, "Socket was NULL, check if SQL server is running."); + /* Pointer to the buffer we screw around with substitution in */ char* query; @@ -500,6 +503,9 @@ class SQLConn : public classbase tds_free_socket(sock); if (conn) tds_free_connection(conn); + login = NULL; + sock = NULL; + conn = NULL; } SQLhost GetConfHost() |