From 6a6fc3df74c8ed91d4ea1813b3f6a6c3bf48a288 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 31 Jul 2014 18:02:42 +0200 Subject: [PATCH] resolved: make sure we always initialize r when parsing TXT records --- src/resolve/resolved-dns-packet.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c index 5d4e097..05c62a4 100644 --- a/src/resolve/resolved-dns-packet.c +++ b/src/resolve/resolved-dns-packet.c @@ -524,6 +524,7 @@ int dns_packet_append_rr(DnsPacket *p, const DnsResourceRecord *rr, size_t *star goto fail; } + r = 0; break; } @@ -977,7 +978,9 @@ int dns_packet_read_rr(DnsPacket *p, DnsResourceRecord **ret, size_t *start) { r = strv_consume(&rr->txt.strings, s); if (r < 0) goto fail; - }; + } + + r = 0; break; } -- 2.7.4