chiark / gitweb /
libsystemd-dhcp: Return proper error on OOM
authorPatrik Flykt <patrik.flykt@linux.intel.com>
Fri, 20 Dec 2013 15:16:12 +0000 (17:16 +0200)
committerTom Gundersen <teg@jklm.no>
Sun, 22 Dec 2013 13:28:00 +0000 (14:28 +0100)
src/libsystemd-dhcp/dhcp-client.c

index fe41067..043d574 100644 (file)
@@ -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);