summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 665099d)
raw | patch | inline | side by side (parent: 665099d)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 1 Apr 2016 15:18:42 +0000 (17:18 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 1 Apr 2016 15:18:42 +0000 (17:18 +0200) |
src/mysql.c | patch | blob | history |
diff --git a/src/mysql.c b/src/mysql.c
index 029796e6c5045852f56a9fd60c39f36a517ce5d0..4c94732b6bcfde5af52d7bc609f36e484aceca9e 100644 (file)
--- a/src/mysql.c
+++ b/src/mysql.c
return (-1);
}
- db = malloc (sizeof (*db));
+ db = calloc (1, sizeof (*db));
if (db == NULL)
{
- ERROR ("mysql plugin: malloc failed.");
+ ERROR ("mysql plugin: calloc failed.");
return (-1);
}
- memset (db, 0, sizeof (*db));
/* initialize all the pointers */
db->alias = NULL;