resolved: make sure we initialize t->answer_errno before completing the transaction
authorLennart Poettering <lennart@poettering.net>
Fri, 28 Aug 2020 20:44:57 +0000 (22:44 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 20 Sep 2020 10:40:28 +0000 (12:40 +0200)
commit156570cc774bd129e889c6a44c094189ac0e8fb1
treeb2fcde422f09fe4fb48ef6278e190d84a9b2e0a7
parent02bba02fa699732881d4ac771dc5b11c00ec459c
resolved: make sure we initialize t->answer_errno before completing the transaction

We must have the error number around when completing the transaction.
Let's hence make sure we always initialize it *first* (we accidentally
did it once after).

Fixes: #11626
(cherry picked from commit fd8a30170342cfe245ea6acac392c2b224f0ae1b)
(cherry picked from commit 38ae73fafd39915e7b40fe311165fcec79fc0ee8)
(cherry picked from commit 54948d498a7b0ad446907ff51ecd549484d517bb)
src/resolve/resolved-dns-transaction.c