ERROR ("Looking up \"%s\" failed. You have set the "
"\"FQDNLookup\" option, but I cannot resolve "
"my hostname to a fully qualified domain "
- "name. Please fix you network "
+ "name. Please fix the network "
"configuration.", hostname_g);
return (-1);
}
while ((dirlen > 0) && (dir[dirlen - 1] == '/'))
dir[--dirlen] = '\0';
- if (dirlen <= 0)
+ if (dirlen <= 0) {
+ free (dir);
return (-1);
+ }
status = chdir (dir);
if (status == 0)
static int pidfile_remove (void)
{
const char *file = global_option_get ("PIDFile");
+ if (file == NULL)
+ return 0;
- DEBUG ("unlink (%s)", (file != NULL) ? file : "<null>");
return (unlink (file));
} /* static int pidfile_remove (const char *file) */
#endif /* COLLECT_DAEMON */