summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 58b2eba)
raw | patch | inline | side by side (parent: 58b2eba)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 1 Apr 2016 16:02:18 +0000 (18:02 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 1 Apr 2016 16:02:18 +0000 (18:02 +0200) |
src/openldap.c | patch | blob | history |
diff --git a/src/openldap.c b/src/openldap.c
index 0a86d521e508158ebd97b8a84bfe67568e927b23..055f2d16c660568485774f34546eedfba372832a 100644 (file)
--- a/src/openldap.c
+++ b/src/openldap.c
int i;
int status;
- st = malloc (sizeof (*st));
+ st = calloc (1, sizeof (*st));
if (st == NULL)
{
- ERROR ("openldap plugin: malloc failed.");
+ ERROR ("openldap plugin: calloc failed.");
return (-1);
}
- memset (st, 0, sizeof (*st));
status = cf_util_get_string (ci, &st->name);
if (status != 0)