X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Flibcollectdclient%2Fclient.c;h=8b5ac0bd490b711ae975f467665079f84837d211;hb=21058a13ed34ade6d2de0f54e4216b255d033af1;hp=aeb8f22ae7952334094e1cee4ce60f9394611cb3;hpb=1ebf2f31bd2e080e6f42de640f0a3899a61501c0;p=collectd.git diff --git a/src/libcollectdclient/client.c b/src/libcollectdclient/client.c index aeb8f22a..8b5ac0bd 100644 --- a/src/libcollectdclient/client.c +++ b/src/libcollectdclient/client.c @@ -584,10 +584,9 @@ int lcc_connect (const char *address, lcc_connection_t **ret_con) /* {{{ */ if (ret_con == NULL) return (-1); - c = malloc (sizeof (*c)); + c = calloc (1, sizeof (*c)); if (c == NULL) return (-1); - memset (c, 0, sizeof (*c)); status = lcc_open_socket (c, address); if (status != 0)