[icinga-checkins] icinga.org: icinga-core/mfriedrich/ido: Fixed leak in idoutils ( configuration variables).

git at icinga.org git at icinga.org
Tue Feb 12 18:28:23 CET 2013


Module: icinga-core
Branch: mfriedrich/ido
Commit: 1ddcd76e7c1dcfee2f2f65e6eedb99da54168b78
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=1ddcd76e7c1dcfee2f2f65e6eedb99da54168b78

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Tue Feb 12 13:36:15 2013 +0100

Fixed leak in idoutils (configuration variables).

---

 module/idoutils/src/idomod.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/module/idoutils/src/idomod.c b/module/idoutils/src/idomod.c
index 18ee355..a738b39 100644
--- a/module/idoutils/src/idomod.c
+++ b/module/idoutils/src/idomod.c
@@ -242,6 +242,8 @@ int idomod_deinit(void) {
 
 	/* save unprocessed data to buffer file */
 	idomod_save_unprocessed_data(idomod_buffer_file);
+	free(idomod_buffer_file);
+	idomod_buffer_file = NULL;
 
 	/* clear sink buffer */
 	idomod_sink_buffer_deinit(&sinkbuf);
@@ -255,6 +257,16 @@ int idomod_deinit(void) {
 	/* close debug log */
 	idomod_close_debug_log();
 
+	/* free variables */
+	free(idomod_instance_name);
+	idomod_instance_name = NULL;
+
+	free(idomod_sink_name);
+	idomod_sink_name = NULL;
+
+	free(idomod_sink_rotation_command);
+	idomod_sink_rotation_command = NULL;
+
 	return IDO_OK;
 }
 
@@ -4707,6 +4719,9 @@ int idomod_close_debug_log(void) {
 	if (idomod_debug_file_fp != NULL)
 		fclose(idomod_debug_file_fp);
 
+	free(idomod_debug_file);
+	idomod_debug_file = NULL;
+
 	idomod_debug_file_fp = NULL;
 
 	return IDO_OK;





More information about the icinga-checkins mailing list