[icinga-checkins] icinga.org: icinga2/feature/box-5024: Fix crash in CompatUtility:: GetCheckResultPerfdata.

git at icinga.org git at icinga.org
Fri Nov 8 14:01:18 CET 2013


Module: icinga2
Branch: feature/box-5024
Commit: 59739d9ae45f336a54feb1b33867973846eb2238
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=59739d9ae45f336a54feb1b33867973846eb2238

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Fri Nov  8 14:00:38 2013 +0100

Fix crash in CompatUtility::GetCheckResultPerfdata.

Refs #5026

---

 lib/icinga/compatutility.cpp |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/icinga/compatutility.cpp b/lib/icinga/compatutility.cpp
index de26f8c..f3f540b 100644
--- a/lib/icinga/compatutility.cpp
+++ b/lib/icinga/compatutility.cpp
@@ -559,8 +559,7 @@ String CompatUtility::GetCheckResultPerfdata(const Dictionary::Ptr& cr)
 	if (!cr)
 		return String();
 
-	Dictionary::Ptr perfdata = cr->Get("performance_data");
-	return PluginUtility::FormatPerfdata(perfdata);
+	return PluginUtility::FormatPerfdata(cr->Get("performance_data"));
 }
 
 String CompatUtility::EscapeString(const String& str)





More information about the icinga-checkins mailing list