summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 72d3720)
raw | patch | inline | side by side (parent: 72d3720)
author | Sebastian Harl <sh@tokkee.org> | |
Thu, 20 Mar 2008 10:03:32 +0000 (11:03 +0100) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Sat, 22 Mar 2008 08:32:47 +0000 (09:32 +0100) |
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/liboconfig/oconfig.c | patch | blob | history |
index 2bb80cc99a864b6112dd065048221310b8ca3211..db9285b3cf47052581405dcfce2d69170d0c587f 100644 (file)
--- a/src/liboconfig/oconfig.c
+++ b/src/liboconfig/oconfig.c
{
int i;
+ if (ci == NULL)
+ return;
+
+ if (ci->key != NULL)
+ free (ci->key);
+
+ for (i = 0; i < ci->values_num; i++)
+ if ((ci->values[i].type == OCONFIG_TYPE_STRING)
+ && (NULL != ci->values[i].value.string))
+ free (ci->values[i].value.string);
+
if (ci->values != NULL)
free (ci->values);
for (i = 0; i < ci->children_num; i++)
oconfig_free (ci->children + i);
+
+ if (ci->children != NULL)
+ free (ci->children);
}
/*