summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ac7b627)
raw | patch | inline | side by side (parent: ac7b627)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 1 Apr 2016 14:01:27 +0000 (16:01 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 1 Apr 2016 14:01:27 +0000 (16:01 +0200) |
src/filecount.c | patch | blob | history |
diff --git a/src/filecount.c b/src/filecount.c
index 7c96a48f4b9705a12878a2ab87dcb0d62a9dc8ba..3b5038cde2390f036734c87cccab87f2b186146b 100644 (file)
--- a/src/filecount.c
+++ b/src/filecount.c
}
/* Initialize `dir' */
- dir = malloc (sizeof (*dir));
+ dir = calloc (1, sizeof (*dir));
if (dir == NULL)
{
- ERROR ("filecount plugin: malloc failed.");
+ ERROR ("filecount plugin: calloc failed.");
return (-1);
}
- memset (dir, 0, sizeof (*dir));
dir->path = strdup (ci->values[0].value.string);
if (dir->path == NULL)