resolved: allow DnsAnswer objects with no space for RRs

They might be created as result of merged answer sets, hence accept
them.

http://lists.freedesktop.org/archives/systemd-devel/2015-April/030834.html
This commit is contained in:
Lennart Poettering
2015-05-18 23:38:47 +02:00
parent cab5b05903
commit 084cea6cee

View File

@@ -25,8 +25,6 @@
DnsAnswer *dns_answer_new(unsigned n) {
DnsAnswer *a;
assert(n > 0);
a = malloc0(offsetof(DnsAnswer, rrs) + sizeof(DnsResourceRecord*) * n);
if (!a)
return NULL;