X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/8c7e6453aff765245cc5c28f37543f13d92dbe74..0f4172ffbddd7b51c80f388adc69c4601d230bf6:/projects/stargazer/plugins/configuration/sgconfig/conn.cpp diff --git a/projects/stargazer/plugins/configuration/sgconfig/conn.cpp b/projects/stargazer/plugins/configuration/sgconfig/conn.cpp index c792125e..8bebeccc 100644 --- a/projects/stargazer/plugins/configuration/sgconfig/conn.cpp +++ b/projects/stargazer/plugins/configuration/sgconfig/conn.cpp @@ -15,7 +15,7 @@ */ /* - * Author : Maxim Mamontov + * Author : Maksym Mamontov */ #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 = ""; + 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();