1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

network/ndisc: fix use-of-uninitialized-value on failure path

Fixes a bug in f44eebd1ba.

Also slightly adjust log message.
This commit is contained in:
Yu Watanabe 2024-02-08 05:47:03 +09:00
parent 0627b29e0a
commit a8b0b84822

View File

@ -526,7 +526,7 @@ static int ndisc_router_process_onlink_prefix(Link *link, sd_ndisc_router *rt) {
/* Prefix Information option does not have preference, hence we use the 'main' preference here */
r = sd_ndisc_router_get_preference(rt, &preference);
if (r < 0)
log_link_warning_errno(link, r, "Failed to get default router preference from RA: %m");
return log_link_warning_errno(link, r, "Failed to get router preference from RA: %m");
r = route_new(&route);
if (r < 0)