projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
curl plugin: correct error message
[collectd.git]
/
src
/
email.c
diff --git
a/src/email.c
b/src/email.c
index
8898c08
..
8a1ac2e
100644
(file)
--- a/
src/email.c
+++ b/
src/email.c
@@
-46,10
+46,6
@@
#include <stddef.h>
#include <stddef.h>
-#if HAVE_LIBPTHREAD
-# include <pthread.h>
-#endif
-
#include <sys/un.h>
#include <sys/select.h>
#include <sys/un.h>
#include <sys/select.h>
@@
-537,13
+533,12
@@
static void *open_connection (void __attribute__((unused)) *arg)
break;
}
break;
}
- connection =
malloc (
sizeof (*connection));
+ connection =
calloc (1,
sizeof (*connection));
if (connection == NULL)
{
close (remote);
continue;
}
if (connection == NULL)
{
close (remote);
continue;
}
- memset (connection, 0, sizeof (*connection));
connection->socket = fdopen (remote, "r");
connection->next = NULL;
connection->socket = fdopen (remote, "r");
connection->next = NULL;