summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-common.c
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2019-09-12 15:19:09 +0300
committerRavishankar N <ravishankar@redhat.com>2019-09-20 09:00:29 +0000
commitc7968f601a7cd4f54103f63d8db1f1a268c0ec5b (patch)
treefab3b94cb6b478e832887b6b40ab37d06bfdd136 /xlators/cluster/afr/src/afr-common.c
parent1088301998d4feabc4285fc6298c08e19a2a558d (diff)
afr-common.c, afr-self-heal.h: calloc/alloca0 -> malloc/alloca
In 3 cases, there was a memory allocation and zeroing, followed directly by populating it with content. Replaced with memory allocation that did not zero the memory. Change-Id: I4fbb5c924fb3a144e415d2368126b784dde760ea updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-common.c')
-rw-r--r--xlators/cluster/afr/src/afr-common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index e4737cd33e5..0e5a15092bf 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -5696,7 +5696,7 @@ afr_local_init(afr_local_t *local, afr_private_t *priv, int32_t *op_errno)
goto out;
}
- local->child_up = GF_CALLOC(priv->child_count, sizeof(*local->child_up),
+ local->child_up = GF_MALLOC(priv->child_count * sizeof(*local->child_up),
gf_afr_mt_char);
if (!local->child_up) {
if (op_errno)