From: Lennart Poettering Date: Tue, 23 Feb 2021 14:29:10 +0000 (+0100) Subject: resolved: don't dereference ->scope unless set X-Git-Tag: v248-rc2~1^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=013668db32fe41ad097ce52b4dff2960c4b64749;p=thirdparty%2Fsystemd.git resolved: don't dereference ->scope unless set Coverity 1446388 --- diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c index e3370123513..590652e5d35 100644 --- a/src/resolve/resolved-dns-transaction.c +++ b/src/resolve/resolved-dns-transaction.c @@ -121,10 +121,10 @@ DnsTransaction* dns_transaction_free(DnsTransaction *t) { } LIST_REMOVE(transactions_by_scope, t->scope->transactions, t); - } - if (t->id != 0) - hashmap_remove(t->scope->manager->dns_transactions, UINT_TO_PTR(t->id)); + if (t->id != 0) + hashmap_remove(t->scope->manager->dns_transactions, UINT_TO_PTR(t->id)); + } while ((c = set_steal_first(t->notify_query_candidates))) set_remove(c->transactions, t);