In profile_find_node, skip deleted nodes when finding the second
match. Otherwise, profile_clear_nodes could return an error if a node
has some values to clear but the last one is deleted.
In profile_node_iterator, skip deleted nodes when looking up the
section names. Otherwise we could iterate over a deleted section
and/or ignore its replacement.
(cherry picked from commit
e7f50a1c11845ba73ce4ffa4729d10113563a247)
ticket: 7971
version_fixed: 1.12.2
status: resolved
if (value && (strcmp(p->value, value)))
continue;
}
+ if (p->deleted)
+ continue;
/* A match! */
break;
}
assert(section != NULL);
for (cpp = iter->names; cpp[iter->done_idx]; cpp++) {
for (p=section->first_child; p; p = p->next) {
- if (!strcmp(p->name, *cpp) && !p->value)
+ if (!strcmp(p->name, *cpp) && !p->value && !p->deleted)
break;
}
if (!p) {