aboutsummaryrefslogtreecommitdiff
path: root/src/ini.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ini.c')
-rw-r--r--src/ini.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ini.c b/src/ini.c
index 55d092f..423e642 100644
--- a/src/ini.c
+++ b/src/ini.c
@@ -250,9 +250,18 @@ char *unquote(char *s) {
void ini_free(struct INIFILE **ini) {
for (size_t section = 0; section < (*ini)->section_count; section++) {
+#ifdef DEBUG
+ SYSERROR("freeing section: %s", (*ini)->section[section]->key);
+#endif
for (size_t data = 0; data < (*ini)->section[section]->data_count; data++) {
if ((*ini)->section[section]->data[data]) {
+#ifdef DEBUG
+ SYSERROR("freeing data key: %s", (*ini)->section[section]->data[data]->key);
+#endif
guard_free((*ini)->section[section]->data[data]->key);
+#ifdef DEBUG
+ SYSERROR("freeing data value: %s", (*ini)->section[section]->data[data]->value);
+#endif
guard_free((*ini)->section[section]->data[data]->value);
guard_free((*ini)->section[section]->data[data]);
}