From dd058085f86bd7ac8cca34387e4ab7a853dc5925 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Thu, 23 Aug 2007 02:41:50 +0000 Subject: [PATCH] Code cleanup --- src/account.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/account.c b/src/account.c index 156e10c..08ead63 100644 --- a/src/account.c +++ b/src/account.c @@ -41,9 +41,8 @@ Account * account_new(char const * type, char const * name) Account * account; char * filename; - if((account = malloc(sizeof(*account))) == NULL) + if((account = calloc(1, sizeof(*account))) == NULL) return NULL; - memset(account, 0, sizeof(*account)); if((account->name = strdup(name)) == NULL || (filename = malloc(strlen(PLUGINDIR ACCOUNT) + strlen(name) + 6)) == NULL)