[icinga-checkins] icinga.org: icinga-core/master: fix acknowledgments query

git at icinga.org git at icinga.org
Thu Jan 28 22:36:00 CET 2010


Module: icinga-core
Branch: master
Commit: 0b576e4d452feed5f2241fcce27d0e6f009884f8
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=0b576e4d452feed5f2241fcce27d0e6f009884f8

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Thu Jan 28 22:35:43 2010 +0100

fix acknowledgments query

wrong buffer freed/set as query to db

fixes #261

---

 module/idoutils/src/dbhandlers.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/module/idoutils/src/dbhandlers.c b/module/idoutils/src/dbhandlers.c
index f14e2a2..f4032a9 100644
--- a/module/idoutils/src/dbhandlers.c
+++ b/module/idoutils/src/dbhandlers.c
@@ -3414,9 +3414,10 @@ int ndo2db_handle_acknowledgementdata(ndo2db_idi *idi) {
                     ,buf1
                    )==-1)
                 buf=NULL;
-        free(buf1);
 
-	result = ndo2db_db_query(idi, buf1);
+	free(buf1);
+
+	result = ndo2db_db_query(idi, buf);
 
 #ifndef USE_ORACLE /* everything else will be libdbi */
 	dbi_result_free(idi->dbinfo.dbi_result);
@@ -3427,7 +3428,6 @@ int ndo2db_handle_acknowledgementdata(ndo2db_idi *idi) {
 #endif /* Oracle ocilib specific */
 
 	free(buf);
-	free(buf1);
 
 	/* free memory */
 	for (x = 0; x < NAGIOS_SIZEOF_ARRAY(ts); x++)





More information about the icinga-checkins mailing list