summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6e6efef)
raw | patch | inline | side by side (parent: 6e6efef)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 1 Apr 2016 16:04:51 +0000 (18:04 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 1 Apr 2016 16:04:51 +0000 (18:04 +0200) |
src/pinba.c | patch | blob | history |
diff --git a/src/pinba.c b/src/pinba.c
index d13d047b208aaab564889c4c3c24b570f2c92a68..f6ddcdaf64b08777962262ee01dd286049d89b0b 100644 (file)
--- a/src/pinba.c
+++ b/src/pinba.c
}
assert (ai_list != NULL);
- s = malloc (sizeof (*s));
+ s = calloc (1, sizeof (*s));
if (s == NULL)
{
freeaddrinfo (ai_list);
- ERROR ("pinba plugin: malloc failed.");
+ ERROR ("pinba plugin: calloc failed.");
return (NULL);
}
- memset (s, 0, sizeof (*s));
for (ai_ptr = ai_list; ai_ptr != NULL; ai_ptr = ai_ptr->ai_next)
{