Skip to content
Snippets Groups Projects
Commit fe6e44fd authored by Marek Vavruša's avatar Marek Vavruša
Browse files

lib/zonecut: check for parent of root

parent 3e57f56c
Branches
Tags
No related merge requests found
......@@ -254,12 +254,12 @@ int kr_zonecut_find_cached(struct kr_context *ctx, struct kr_zonecut *cut, const
/* Start at QNAME parent. */
name = knot_wire_next_label(name, NULL);
while (txn) {
while (txn && name) {
if (fetch_ns(ctx, cut, name, txn, timestamp) == 0) {
update_cut_name(cut, name);
return kr_ok();
}
if (name[0] == '\0') {
if (!name || !name[0]) {
break;
}
/* Subtract label from QNAME. */
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment