From: Thomas Hindoe Paaboel Andersen Date: Wed, 18 Jun 2014 18:26:54 +0000 (+0200) Subject: sd-dhcp-client: check return from dhcp_option_append X-Git-Tag: v215~343 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f7926298e934c91dc2d152f4223cafbd202c907c;p=platform%2Fupstream%2Fsystemd.git sd-dhcp-client: check return from dhcp_option_append --- diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index 2a46624..c1af6df 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