Start with route set to NULL should there be no route created. Remove
the explicit route_free as the _cleanup_ will take care of that after
the continue;.
&lifetime_preferred,
&lifetime_valid) >= 0) {
_cleanup_free_ char *buf = NULL;
- _cleanup_free_ Route *route;
+ _cleanup_free_ Route *route = NULL;
if (pd_prefix_len > 64)
continue;
log_link_warning_errno(link, r, "Cannot delete unreachable route for DHCPv6 delegated subnet %s/%u: %m",
strnull(buf),
pd_prefix_len);
- route_free(route);
+
continue;
}
link = link_ref(link);