]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/configuration/sgconfig/conn.cpp
Remove TravisCI file as well.
[stg.git] / projects / stargazer / plugins / configuration / sgconfig / conn.cpp
index c792125ea35e3eb42f4c14923123adaa095f034d..8bebeccc8d0272f35f6f290d06557d21d7d0aaae 100644 (file)
@@ -15,7 +15,7 @@
  */
 
 /*
- *    Author : Maxim Mamontov <faust@stargazer.dp.ua>
+ *    Author : Maksym Mamontov <stg@madf.info>
  */
 
 #include "conn.h"
@@ -81,6 +81,9 @@ Conn::~Conn()
     close(m_sock);
 
     XML_ParserFree(m_xmlParser);
+
+    delete m_stream;
+    delete m_parser;
 }
 
 bool Conn::Read()
@@ -283,6 +286,8 @@ bool Conn::WriteResponse()
         answer = m_parser->GetAnswer();
     else
         answer = "<Error result=\"Unknown command.\"/>";
+    delete m_parser;
+    m_parser = NULL;
     printfd(__FILE__, "Writing %d bytes of answer.\n", answer.length());
     stream.Put(answer.c_str(), answer.length() + 1 /* including \0 */, true /* final */);
     return stream.IsOk();