diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-02-23 15:29:10 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-02-23 15:45:23 +0100 |
commit | 013668db32fe41ad097ce52b4dff2960c4b64749 (patch) | |
tree | 7a84a54c90915dbf2f92d209702153c3f3689779 /src/resolve | |
parent | 3178014709074cc65ebbb4604f6da306e34e6ffb (diff) | |
download | systemd-013668db32fe41ad097ce52b4dff2960c4b64749.tar.gz |
resolved: don't dereference ->scope unless set
Coverity 1446388
Diffstat (limited to 'src/resolve')
-rw-r--r-- | src/resolve/resolved-dns-transaction.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c index e337012351..590652e5d3 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); |