From f7926298e934c91dc2d152f4223cafbd202c907c Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen Date: Wed, 18 Jun 2014 20:26:54 +0200 Subject: [PATCH] sd-dhcp-client: check return from dhcp_option_append --- src/libsystemd-network/sd-dhcp-client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index 2a46624f2..c1af6df13 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 -- 2.30.2