[systemd-devel] [PATCH 03/11] libsystemd-dhcp: Return proper error on OOM

Patrik Flykt patrik.flykt at linux.intel.com
Fri Dec 20 07:16:12 PST 2013


---
 src/libsystemd-dhcp/dhcp-client.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libsystemd-dhcp/dhcp-client.c b/src/libsystemd-dhcp/dhcp-client.c
index fe41067..043d574 100644
--- a/src/libsystemd-dhcp/dhcp-client.c
+++ b/src/libsystemd-dhcp/dhcp-client.c
@@ -726,7 +726,7 @@ static int client_receive_ack(sd_dhcp_client *client, DHCPPacket *offer,
 
         lease = new0(DHCPLease, 1);
         if (!lease)
-                return -ENOBUFS;
+                return -ENOMEM;
 
         len = len - DHCP_IP_UDP_SIZE;
         r = dhcp_option_parse(&offer->dhcp, len, client_parse_offer, lease);
-- 
1.7.10.4



More information about the systemd-devel mailing list