projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
write_kafka: do not call depreciated functions unless necessary
[collectd.git]
/
src
/
tcpconns.c
diff --git
a/src/tcpconns.c
b/src/tcpconns.c
index
96221b1
..
6bc3384
100644
(file)
--- a/
src/tcpconns.c
+++ b/
src/tcpconns.c
@@
-385,10
+385,9
@@
static port_entry_t *conn_get_port_entry (uint16_t port, int create)
if ((ret == NULL) && (create != 0))
{
- ret =
malloc (
sizeof (*ret));
+ ret =
calloc (1,
sizeof (*ret));
if (ret == NULL)
return (NULL);
- memset (ret, '\0', sizeof (port_entry_t));
ret->port = port;
ret->next = port_list_head;