summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-transaction.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-01-04 22:22:47 +0100
committerLennart Poettering <lennart@poettering.net>2016-01-04 22:42:10 +0100
commit51e399bcebefb27d6b147d90de84d07f010fa170 (patch)
tree7c20b6da45f363454de9fa89beac189cfeb71efe /src/resolve/resolved-dns-transaction.h
parent3347e6a299983557d27b7ff950199f2eda6d9bd9 (diff)
resolved: block transaction GC'ing while dns_transaction_request_dnssec_keys() is running
If any of the transactions started by dns_transaction_request_dnssec_keys() finishes promptly without requiring asynchronous operation this is reported back to the issuing transaction from the same stackframe. This might ultimately result in this transaction to be freed while we are still in its _request_dnssec_keys() stack frame. To avoid memory corruption block the transaction GC while in the call, and manually issue a GC after it returned.
Diffstat (limited to 'src/resolve/resolved-dns-transaction.h')
-rw-r--r--src/resolve/resolved-dns-transaction.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resolve/resolved-dns-transaction.h b/src/resolve/resolved-dns-transaction.h
index faf3ce6fb9..21e453218a 100644
--- a/src/resolve/resolved-dns-transaction.h
+++ b/src/resolve/resolved-dns-transaction.h
@@ -140,7 +140,7 @@ struct DnsTransaction {
int dns_transaction_new(DnsTransaction **ret, DnsScope *s, DnsResourceKey *key);
DnsTransaction* dns_transaction_free(DnsTransaction *t);
-void dns_transaction_gc(DnsTransaction *t);
+bool dns_transaction_gc(DnsTransaction *t);
int dns_transaction_go(DnsTransaction *t);
void dns_transaction_process_reply(DnsTransaction *t, DnsPacket *p);