Module: check_mk
Branch: master
Commit: 2832272f7e7762d108d761b4d59db066c64435f3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2832272f7e7762…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Sat Mar 30 09:31:47 2013 +0100
livestatus: fix memory leak on removing downtime / comment
---
ChangeLog | 5 ++++-
livestatus/src/TableDownComm.cc | 6 ++++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 982489c..1ebaca9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -79,13 +79,16 @@
* Configuration of an alternativ host check command
* Inventory: Display link symbol for ps ruleset
-1.2.2:
+1.2.2b6:
Checks & Agents:
* FIX: apc_symmetra_power: resurrect garble PNP template for
* FIX: check_mk_agent.freebsd: remove garble from output
(Thanks to Mathias Decker)
* check_http: now support the option -L (urlizing the result)
+ Livestatus:
+ * FIX: memory leak when removing downtime / comment
+
1.2.2b5:
Core:
* Checks can now omit the typical "OK - " or "WARN -". This text
diff --git a/livestatus/src/TableDownComm.cc b/livestatus/src/TableDownComm.cc
index 23109be..c267a85 100644
--- a/livestatus/src/TableDownComm.cc
+++ b/livestatus/src/TableDownComm.cc
@@ -109,7 +109,8 @@ void TableDownComm::addComment(nebstruct_comment_data *data) {
add(new Comment(data));
}
else if (data->type == NEBTYPE_COMMENT_DELETE) {
- remove(new Comment(data));
+ Comment comment(data);
+ remove(&comment);
}
}
@@ -120,7 +121,8 @@ void TableDownComm::addDowntime(nebstruct_downtime_data *data)
add(new Downtime(data));
}
else if (data->type == NEBTYPE_DOWNTIME_DELETE) {
- remove(new Downtime(data));
+ Downtime downtime(data);
+ remove(&downtime);
}
}