{
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;
struct blob_attr *cur;
struct uci_package *p = NULL;
struct uci_ptr ptr = { 0 };
- int rem, i = 1;
+ int rem, i = 0;
blobmsg_parse(rpc_uci_order_policy, __RPC_O_MAX, tb,
blob_data(msg), blob_len(msg));