ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
923a60
From d5b06145261637bcb69c1a213874cce10918a189 Mon Sep 17 00:00:00 2001
923a60
From: Lennart Poettering <lennart@poettering.net>
923a60
Date: Mon, 18 May 2015 23:38:47 +0200
923a60
Subject: [PATCH] resolved: allow DnsAnswer objects with no space for RRs
923a60
923a60
They might be created as result of merged answer sets, hence accept
923a60
them.
923a60
923a60
http://lists.freedesktop.org/archives/systemd-devel/2015-April/030834.html
923a60
(cherry picked from commit 084cea6cee1471d81e078bea4e7ee5f50a5dc009)
923a60
923a60
Cherry-picked from: 084cea6
923a60
Resolves: #1222517
923a60
---
923a60
 src/resolve/resolved-dns-answer.c | 2 --
923a60
 1 file changed, 2 deletions(-)
923a60
923a60
diff --git a/src/resolve/resolved-dns-answer.c b/src/resolve/resolved-dns-answer.c
923a60
index 7c4ab18b58..e08eb667cc 100644
923a60
--- a/src/resolve/resolved-dns-answer.c
923a60
+++ b/src/resolve/resolved-dns-answer.c
923a60
@@ -25,8 +25,6 @@
923a60
 DnsAnswer *dns_answer_new(unsigned n) {
923a60
         DnsAnswer *a;
923a60
 
923a60
-        assert(n > 0);
923a60
-
923a60
         a = malloc0(offsetof(DnsAnswer, rrs) + sizeof(DnsResourceRecord*) * n);
923a60
         if (!a)
923a60
                 return NULL;