summaryrefslogtreecommitdiffstats
path: root/daemons/clvmd/clvmd-openais.c
diff options
context:
space:
mode:
Diffstat (limited to 'daemons/clvmd/clvmd-openais.c')
-rw-r--r--daemons/clvmd/clvmd-openais.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/daemons/clvmd/clvmd-openais.c b/daemons/clvmd/clvmd-openais.c
index 5f237e9b..9ce73d6a 100644
--- a/daemons/clvmd/clvmd-openais.c
+++ b/daemons/clvmd/clvmd-openais.c
@@ -197,14 +197,13 @@ static int add_internal_client(int fd, fd_callback_t callback)
DEBUGLOG("Add_internal_client, fd = %d\n", fd);
- client = malloc(sizeof(struct local_client));
+ client = calloc(1, sizeof(struct local_client));
if (!client)
{
DEBUGLOG("malloc failed\n");
return -1;
}
- memset(client, 0, sizeof(struct local_client));
client->fd = fd;
client->type = CLUSTER_INTERNAL;
client->callback = callback;