[LEDE-DEV] [PATCH] uci: decrement package's section counter when free'ing sections
Reiner Herrmann
reiner at reiner-h.de
Tue Sep 13 07:25:24 PDT 2016
The counter is incremented during section allocation, but never
decremented.
Signed-off-by: Reiner Herrmann <reiner at reiner-h.de>
---
list.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/list.c b/list.c
index 321861c..a2be150 100644
--- a/list.c
+++ b/list.c
@@ -213,6 +213,7 @@ uci_free_section(struct uci_section *s)
if ((s->type != uci_dataptr(s)) &&
(s->type != NULL))
free(s->type);
+ s->package->n_section--;
uci_free_element(&s->e);
}
--
2.1.4
More information about the Lede-dev
mailing list