From e9851b740269826feafefb82350e7446c941148a Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Fri, 1 Apr 2016 15:50:42 +0200 Subject: [PATCH] email plugin: malloc + memset -> calloc --- src/email.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/email.c b/src/email.c index 8898c087..ea4e7850 100644 --- 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; -- 2.30.2