projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
039aa55
)
amqp: malloc + memset -> calloc
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Mon, 28 Mar 2016 17:32:51 +0000
(19:32 +0200)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Mon, 28 Mar 2016 17:32:51 +0000
(19:32 +0200)
src/amqp.c
patch
|
blob
|
history
diff --git
a/src/amqp.c
b/src/amqp.c
index
4206bdc
..
ec79430
100644
(file)
--- a/
src/amqp.c
+++ b/
src/amqp.c
@@
-925,15
+925,14
@@
static int camqp_config_connection (oconfig_item_t *ci, /* {{{ */
int status;
int i;
- conf =
malloc (
sizeof (*conf));
+ conf =
calloc (1,
sizeof (*conf));
if (conf == NULL)
{
- ERROR ("amqp plugin:
m
alloc failed.");
+ ERROR ("amqp plugin:
c
alloc failed.");
return (ENOMEM);
}
/* Initialize "conf" {{{ */
- memset (conf, 0, sizeof (*conf));
conf->publish = publish;
conf->name = NULL;
conf->format = CAMQP_FORMAT_COMMAND;