Module: check_mk
Branch: master
Commit: b99b29197896ca3c259a8c4de4571d82ab83afe9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b99b29197896ca…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Oct 25 17:14:53 2013 +0200
table statehist: fixed memory leak
---
ChangeLog | 1 +
livestatus/src/TableStateHistory.cc | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 55101fc..9a73686 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -112,6 +112,7 @@
* table statehist: no longer computes an unmonitored state for hosts and
services on certain instances.
(showed up as no hosts/services in the multisite gui)
+ * table statehist: fixed memory leak
1.2.3i4:
Core:
diff --git a/livestatus/src/TableStateHistory.cc b/livestatus/src/TableStateHistory.cc
index 6a6d93c..ac95135 100644
--- a/livestatus/src/TableStateHistory.cc
+++ b/livestatus/src/TableStateHistory.cc
@@ -633,6 +633,12 @@ void TableStateHistory::answerQuery(Query *query)
process(query, hst);
it_hst++;
}
+ it_hst = state_info.begin();
+ while (it_hst != state_info.end()) {
+ delete it_hst->second;
+ it_hst++;
+ }
+
g_store->logCache()->unlockLogCache();
}