projects
/
project
/
uci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more cleanup/list fixes
[project/uci.git]
/
list.c
diff --git
a/list.c
b/list.c
index
51fca61
..
dee6a14
100644
(file)
--- a/
list.c
+++ b/
list.c
@@
-50,6
+50,7
@@
static void uci_drop_section(struct uci_section *section)
{
if (!section)
return;
{
if (!section)
return;
+ /* TODO: drop options */
if (section->name)
free(section->name);
if (section->type)
if (section->name)
free(section->name);
if (section->type)
@@
-83,9
+84,13
@@
error:
static void uci_drop_file(struct uci_config *cfg)
{
static void uci_drop_file(struct uci_config *cfg)
{
- /* TODO: free children */
+ struct uci_section *s;
+
if(!cfg)
return;
if(!cfg)
return;
+ uci_foreach_entry(section, &cfg->sections, s) {
+ uci_drop_section(s);
+ }
if (cfg->name)
free(cfg->name);
free(cfg);
if (cfg->name)
free(cfg->name);
free(cfg);