]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: add missing error check
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 14 May 2019 08:58:20 +0000 (17:58 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 15 May 2019 03:44:30 +0000 (12:44 +0900)
src/network/networkd-ipv4ll.c

index 8fb8a64e6d2ff1cb477b006581974e95bc263179..9df5646a7e61c0186375383f7b42c8ea4ee2334d 100644 (file)
@@ -34,7 +34,9 @@ static int ipv4ll_address_lost(Link *link) {
         address->prefixlen = 16;
         address->scope = RT_SCOPE_LINK;
 
-        address_remove(address, link, NULL);
+        r = address_remove(address, link, NULL);
+        if (r < 0)
+                return r;
 
         r = route_new(&route);
         if (r < 0)
@@ -44,7 +46,9 @@ static int ipv4ll_address_lost(Link *link) {
         route->scope = RT_SCOPE_LINK;
         route->priority = IPV4LL_ROUTE_METRIC;
 
-        route_remove(route, link, NULL);
+        r = route_remove(route, link, NULL);
+        if (r < 0)
+                return r;
 
         link_check_ready(link);