projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b15ebef
)
apache: malloc + memset -> calloc
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Mon, 28 Mar 2016 17:40:12 +0000
(19:40 +0200)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Mon, 28 Mar 2016 17:40:12 +0000
(19:40 +0200)
src/apache.c
patch
|
blob
|
history
diff --git
a/src/apache.c
b/src/apache.c
index
38035ca
..
baa6081
100644
(file)
--- a/
src/apache.c
+++ b/
src/apache.c
@@
-175,13
+175,12
@@
static int config_add (oconfig_item_t *ci)
int i;
int status;
- st =
malloc (
sizeof (*st));
+ st =
calloc (1,
sizeof (*st));
if (st == NULL)
{
- ERROR ("apache plugin:
m
alloc failed.");
+ ERROR ("apache plugin:
c
alloc failed.");
return (-1);
}
- memset (st, 0, sizeof (*st));
st->timeout = -1;