projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d5cc61c
)
email plugin: malloc + memset -> calloc
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Fri, 1 Apr 2016 13:50:42 +0000
(15:50 +0200)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Fri, 1 Apr 2016 13:50:42 +0000
(15:50 +0200)
src/email.c
patch
|
blob
|
history
diff --git
a/src/email.c
b/src/email.c
index
8898c08
..
ea4e785
100644
(file)
--- a/
src/email.c
+++ b/
src/email.c
@@
-537,13
+537,12
@@
static void *open_connection (void __attribute__((unused)) *arg)
break;
}
- connection =
malloc (
sizeof (*connection));
+ connection =
calloc (1,
sizeof (*connection));
if (connection == NULL)
{
close (remote);
continue;
}
- memset (connection, 0, sizeof (*connection));
connection->socket = fdopen (remote, "r");
connection->next = NULL;