]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-dhcp6-client: do not refer uninitialized variable
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 21 Jan 2018 10:27:27 +0000 (19:27 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 21 Jan 2018 10:27:30 +0000 (19:27 +0900)
Fixes CID #1385308.

src/libsystemd-network/sd-dhcp6-client.c

index f98a18268f9476fbb2dd5963b6fd6f15e4665659..25b054e25268b1a57267589a79680a5c3d18524d 100644 (file)
@@ -948,7 +948,7 @@ static int client_parse_message(
                 pos += sizeof(*option) + optlen;
         }
 
-        if (r < 0 || !clientid) {
+        if (!clientid) {
                 log_dhcp6_client(client, "%s has incomplete options",
                                  dhcp6_message_type_to_string(message->type));
                 return -EINVAL;