chiark / gitweb /
sd-dhcp-client: check return from dhcp_option_append
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Wed, 18 Jun 2014 18:26:54 +0000 (20:26 +0200)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Wed, 18 Jun 2014 21:21:00 +0000 (23:21 +0200)
src/libsystemd-network/sd-dhcp-client.c

index 2a46624..c1af6df 100644 (file)
@@ -398,6 +398,8 @@ static int client_send_discover(sd_dhcp_client *client) {
 
         r = dhcp_option_append(&discover->dhcp, optlen, &optoffset, 0,
                                DHCP_OPTION_END, 0, NULL);
+        if (r < 0)
+                return r;
 
         /* We currently ignore:
            The client SHOULD wait a random time between one and ten seconds to