From 6e18f44e1765c4be396e6a4d51dc438a6df3b89a Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Fri, 1 Apr 2016 18:23:42 +0200 Subject: [PATCH] tcpconns plugin: malloc + memset -> calloc --- src/tcpconns.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tcpconns.c b/src/tcpconns.c index 96221b19..6bc33842 100644 --- 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; -- 2.30.2