summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--uci.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/uci.c b/uci.c
index 17b4d89..a1b8311 100644
--- a/uci.c
+++ b/uci.c
@@ -212,8 +212,12 @@ rpc_uci_replace_savedir(const char *path)
{
struct uci_element *e, *tmp;
- uci_foreach_element_safe(&cursor->delta_path, tmp, e)
+ uci_foreach_element_safe(&cursor->delta_path, tmp, e) {
+ if (e->name)
+ free(e->name);
+
free(e);
+ }
cursor->delta_path.prev = &cursor->delta_path;
cursor->delta_path.next = &cursor->delta_path;