summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a6fc89e)
raw | patch | inline | side by side (parent: a6fc89e)
author | Florian Forster <octo@noris.net> | |
Wed, 3 Mar 2010 14:44:11 +0000 (15:44 +0100) | ||
committer | Florian Forster <octo@noris.net> | |
Wed, 10 Mar 2010 17:40:06 +0000 (18:40 +0100) |
src/configfile.c | patch | blob | history |
diff --git a/src/configfile.c b/src/configfile.c
index d401a2e1e0e2998a1a965fa9b31acb2532106682..34049f2ee6e9df6f7ab501347b4495584a0af4eb 100644 (file)
--- a/src/configfile.c
+++ b/src/configfile.c
ERROR ("configfile: malloc failed.");
return (NULL);
}
- memset (root, '\0', sizeof (oconfig_item_t));
+ memset (root, 0, sizeof (oconfig_item_t));
while ((de = readdir (dh)) != NULL)
{
char name[1024];
char **tmp;
- if ((de->d_name[0] == '.') || (de->d_name[0] == '\0'))
+ if ((de->d_name[0] == '.') || (de->d_name[0] == 0))
continue;
status = ssnprintf (name, sizeof (name), "%s/%s",
char *name = filenames[i];
temp = cf_read_generic (name, depth);
- if (temp == NULL) {
- int j;
- for (j = i; j < filenames_num; ++j)
- free (filenames[j]);
- free (filenames);
- oconfig_free (root);
- return (NULL);
+ if (temp == NULL)
+ {
+ /* An error should already have been reported. */
+ sfree (name);
+ continue;
}
cf_ci_append_children (root, temp);