The memory allocated to store the information about configured directories did
not take into account the newly added directory. This would cause a segfault
at some point of time (when specifying more than four directories in my case).
Thanks to Martin Janota <janota.m@cce.cz> for finding and reporting this bug.
fc_directory_conf_t **temp;
temp = (fc_directory_conf_t **) realloc (directories,
- sizeof (*directories) * directories_num);
+ sizeof (*directories) * (directories_num + 1));
if (temp == NULL)
{
ERROR ("filecount plugin: realloc failed.");