#ifdef HAVE_DNSSEC
cache_blockdata_free(crecp);
#endif
-@@ -1131,7 +1134,7 @@
+@@ -1138,7 +1141,7 @@
}
struct in_addr a_record_from_hosts(char *name, time_t now)
{
struct crec *crecp = NULL;
-@@ -1274,7 +1277,11 @@
+@@ -1281,7 +1284,11 @@
else
crec->ttd = ttd;
crec->addr.addr = *host_address;
--- a/src/dnsmasq.c Thu Jul 30 20:59:06 2015
+++ b/src/dnsmasq.c Wed Dec 16 19:38:32 2015
-@@ -982,6 +982,11 @@
+@@ -1017,6 +1017,11 @@
poll_resolv(0, daemon->last_resolv != 0, now);
daemon->last_resolv = now;
--- a/src/dnsmasq.h Wed Dec 16 19:24:12 2015
+++ b/src/dnsmasq.h Wed Dec 16 19:40:11 2015
-@@ -1513,8 +1513,12 @@
+@@ -1516,6 +1516,11 @@
void poll_listen(int fd, short event);
int do_poll(int timeout);
-
--- /dev/null Wed Dec 16 19:48:08 2015
+++ b/src/isc.c Wed Dec 16 19:41:35 2015
-@@ -0,0 +1,251 @@
+@@ -0,0 +1,266 @@
+/* dnsmasq is Copyright (c) 2014 John Volpe, Simon Kelley and
+ Michael Tremer
+
+ Michael Tremer.
+*/
+
++
++#define _GNU_SOURCE
++
++#include <assert.h>
++#include <stdio.h>
++
+#include "dnsmasq.h"
+
+#ifdef HAVE_ISC_READER
+
+static struct isc_dhcp_lease* dhcp_lease_new(const char* hostname) {
+ struct isc_dhcp_lease* lease = whine_malloc(sizeof(*lease));
++ if (!lease)
++ return NULL;
+
+ lease->name = strdup(hostname);
+ if (daemon->domain_suffix) {
-+ asprintf(&lease->fqdn, "%s.%s", hostname, daemon->domain_suffix);
++ int r = asprintf(&lease->fqdn, "%s.%s", hostname, daemon->domain_suffix);
++
++ // Handle OOM
++ if (r < 0) {
++ free(lease);
++ return NULL;
++ }
+ }
+ lease->expires = 0;
+ lease->next = NULL;
+ // and append it to the list.
+ if (!lease) {
+ lease = dhcp_lease_new(hostname);
++ assert(lease);
+
+ lease->next = leases;
+ leases = lease;
+#endif
--- a/src/option.c Wed Dec 16 19:24:12 2015
+++ b/src/option.c Wed Dec 16 19:42:48 2015
-@@ -1754,7 +1754,7 @@
+@@ -1771,7 +1771,7 @@
ret_err(_("bad MX target"));
break;
helper.o tftp.o log.o conntrack.o dhcp6.o rfc3315.o \
dhcp-common.o outpacket.o radv.o slaac.o auth.o ipset.o \
domain.o dnssec.o blockdata.o tables.o loop.o inotify.o \
-- poll.o rrfilter.o
-+ poll.o rrfilter.o isc.o
+- poll.o rrfilter.o edns0.o arp.o
++ poll.o rrfilter.o edns0.o arp.o isc.o
hdrs = dnsmasq.h config.h dhcp-protocol.h dhcp6-protocol.h \
dns-protocol.h radv-protocol.h ip6addr.h