Skip to content

Commit 598f44b

Browse files
committed
resolved: make sure we GC stream transactions properly
Make sure to GC a transaction after dealing with a reply, even if the transaction is not complete yet.
1 parent 5a7e41a commit 598f44b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/resolve/resolved-dns-transaction.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,8 @@ static int on_stream_complete(DnsStream *s, int error) {
342342
/* If the response wasn't useful, then complete the transition now */
343343
if (t->state == DNS_TRANSACTION_PENDING)
344344
dns_transaction_complete(t, DNS_TRANSACTION_INVALID_REPLY);
345+
else
346+
dns_transaction_gc(t);
345347

346348
return 0;
347349
}

0 commit comments

Comments
 (0)