Commit e1c15905 authored by Pavel Vainerman's avatar Pavel Vainerman

Coverity scan:

[ fixed ] CID 22705: Resource leak (RESOURCE_LEAK)
parent db06f342
......@@ -269,19 +269,19 @@ class DebugStream : public std::ostream
// private:
/// The current debug level
Debug::type dt;
Debug::type dt = { Debug::NONE };
/// The no-op stream.
std::ostream nullstream;
///
struct debugstream_internal;
///
debugstream_internal* internal;
bool show_datetime;
bool show_logtype;
std::string fname;
debugstream_internal* internal = { 0 };
bool show_datetime = { true };
bool show_logtype = { true };
std::string fname = { "" };
StreamEvent_Signal s_stream;
std::string logname;
std::string logname = { "" };
bool isWriteLogFile = { false };
};
......
......@@ -43,7 +43,7 @@ using std::ios;
/// Constructor, sets the debug level to t.
DebugStream::DebugStream(Debug::type t)
: ostream(new debugbuf(cerr.rdbuf())),
: /* ostream(new debugbuf(cerr.rdbuf())),*/
dt(t), nullstream(new nullbuf), internal(new debugstream_internal),
show_datetime(true), show_logtype(true),
fname(""),
......@@ -56,7 +56,7 @@ DebugStream::DebugStream(Debug::type t)
//--------------------------------------------------------------------------
/// Constructor, sets the log file to f, and the debug level to t.
DebugStream::DebugStream(char const* f, Debug::type t, bool truncate )
: ostream(new debugbuf(cerr.rdbuf())),
: /* ostream(new debugbuf(cerr.rdbuf())), */
dt(t), nullstream(new nullbuf),
internal(new debugstream_internal),
show_datetime(true), show_logtype(true),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment