summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 91103db)
raw | patch | inline | side by side (parent: 91103db)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 1 Apr 2016 13:49:04 +0000 (15:49 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 1 Apr 2016 13:49:04 +0000 (15:49 +0200) |
src/dbi.c | patch | blob | history |
diff --git a/src/dbi.c b/src/dbi.c
index dab47d66eb1e69f9c2f8da2d376ab8eeab2860d1..7dec51ad85a04a6aacbeac7e94253a988b40f53c 100644 (file)
--- a/src/dbi.c
+++ b/src/dbi.c
return (-1);
}
- db = malloc (sizeof (*db));
+ db = calloc (1, sizeof (*db));
if (db == NULL)
{
- ERROR ("dbi plugin: malloc failed.");
+ ERROR ("dbi plugin: calloc failed.");
return (-1);
}
- memset (db, 0, sizeof (*db));
status = cf_util_get_string (ci, &db->name);
if (status != 0)