From f43b86af318bad0804323e86c004eaf3324cd047 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Fri, 1 Apr 2016 18:09:08 +0200 Subject: [PATCH] postgresql plugin: malloc + memset -> calloc --- src/postgresql.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/postgresql.c b/src/postgresql.c index d532906c..6cf56318 100644 --- a/src/postgresql.c +++ b/src/postgresql.c @@ -1042,12 +1042,11 @@ static int config_query_param_add (udb_query_t *q, oconfig_item_t *ci) data = udb_query_get_user_data (q); if (NULL == data) { - data = malloc (sizeof (*data)); + data = calloc (1, sizeof (*data)); if (NULL == data) { log_err ("Out of memory."); return -1; } - memset (data, 0, sizeof (*data)); data->params = NULL; data->params_num = 0; -- 2.30.2