[icinga-checkins] icinga.org: icinga-core/next: nebmods.c: use calloc for new_module init

git at icinga.org git at icinga.org
Thu Apr 4 10:09:02 CEST 2013


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

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Wed Mar 13 20:11:14 2013 +0100

nebmods.c: use calloc for new_module init

---

 base/nebmods.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/base/nebmods.c b/base/nebmods.c
index da06998..3395a54 100644
--- a/base/nebmods.c
+++ b/base/nebmods.c
@@ -90,7 +90,7 @@ int neb_add_module(char *filename, char *args, int should_be_loaded) {
 		return ERROR;
 
 	/* allocate memory */
-	new_module = (nebmodule *)malloc(sizeof(nebmodule));
+	new_module = (nebmodule *)calloc(1, sizeof(nebmodule));
 	if (new_module == NULL)
 		return ERROR;
 





More information about the icinga-checkins mailing list