[icinga-checkins] icinga.org: icinga2/master: Fix crash in StreamLogger::~StreamLogger

git at icinga.org git at icinga.org
Thu Nov 13 20:12:52 CET 2014


Module: icinga2
Branch: master
Commit: 0324cbff7cdb4a10b15718550bbe15979d77e59a
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=0324cbff7cdb4a10b15718550bbe15979d77e59a

Author: Gunnar Beutner <gunnar at beutner.name>
Date:   Thu Nov 13 19:44:51 2014 +0100

Fix crash in StreamLogger::~StreamLogger

---

 lib/base/streamlogger.cpp |    4 ++++
 lib/base/streamlogger.hpp |    2 ++
 2 files changed, 6 insertions(+)

diff --git a/lib/base/streamlogger.cpp b/lib/base/streamlogger.cpp
index e5ec786..a8e353b 100644
--- a/lib/base/streamlogger.cpp
+++ b/lib/base/streamlogger.cpp
@@ -29,6 +29,10 @@ REGISTER_TYPE(StreamLogger);
 
 boost::mutex StreamLogger::m_Mutex;
 
+StreamLogger::StreamLogger(void)
+	: m_Stream(NULL), m_OwnsStream(false)
+{ }
+
 /**
  * Constructor for the StreamLogger class.
  */
diff --git a/lib/base/streamlogger.hpp b/lib/base/streamlogger.hpp
index d9682fb..c2aee91 100644
--- a/lib/base/streamlogger.hpp
+++ b/lib/base/streamlogger.hpp
@@ -38,6 +38,8 @@ class I2_BASE_API StreamLogger : public ObjectImpl<StreamLogger>
 public:
 	DECLARE_OBJECT(StreamLogger);
 
+	StreamLogger(void);
+
 	virtual void Start(void);
 	virtual void Stop(void);
 	~StreamLogger(void);



More information about the icinga-checkins mailing list