summaryrefslogtreecommitdiff
path: root/src/libsystemd-network
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2014-06-18 20:26:54 +0200
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>2014-06-18 23:21:00 +0200
commitf7926298e934c91dc2d152f4223cafbd202c907c (patch)
tree543258a8595ba29e9871d8329aa424e75a9e65cd /src/libsystemd-network
parent02557f973aed0fed7154fefe53d67e2935f918dc (diff)
sd-dhcp-client: check return from dhcp_option_append
Diffstat (limited to 'src/libsystemd-network')
-rw-r--r--src/libsystemd-network/sd-dhcp-client.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c
index 2a46624f2e..c1af6df131 100644
--- a/src/libsystemd-network/sd-dhcp-client.c
+++ b/src/libsystemd-network/sd-dhcp-client.c
@@ -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