X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=uci.c;h=a1b83117abaed2823193ab110bfd4d211cf02d38;hb=820621952d537c49deba470c6f61c40df93f4ba8;hp=17b4d89eefd84cffc6d057d6ce46b20fed089e4c;hpb=92d0d757161d1950f11abb6e679bfdafa7cbfe85;p=project%2Frpcd.git 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;