diff options
author | Eric Laurent <elaurent@google.com> | 2011-05-27 10:20:00 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-05-27 10:20:00 -0700 |
commit | 3142a203b3c493094f59e5acda0cfa2360dd9038 (patch) | |
tree | d2b7f5fb63d0560b5b1deea306f95479089410bf /libcutils | |
parent | 38d14f76048e6a14303dc81275303b63c9d7b064 (diff) | |
parent | c3cf1a827807d11b07bce9d6941342c68808aab1 (diff) | |
download | system_core-3142a203b3c493094f59e5acda0cfa2360dd9038.zip system_core-3142a203b3c493094f59e5acda0cfa2360dd9038.tar.gz system_core-3142a203b3c493094f59e5acda0cfa2360dd9038.tar.bz2 |
Merge "Config utils improvement"
Diffstat (limited to 'libcutils')
-rw-r--r-- | libcutils/config_utils.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libcutils/config_utils.c b/libcutils/config_utils.c index 75fa6c6..fc5ca78 100644 --- a/libcutils/config_utils.c +++ b/libcutils/config_utils.c @@ -315,3 +315,15 @@ void config_load_file(cnode *root, const char *fn) data = load_file(fn, 0); config_load(root, data); } + +void config_free(cnode *root) +{ + cnode *cur = root->first_child; + + while (cur) { + cnode *prev = cur; + config_free(cur); + cur = cur->next; + free(prev); + } +} |