Fix leak in TcpDnsTest (#11606)

Motivation:

In another PR we did observe a leak report for TcpDnsTest

Modifications:

Correctly release the query.

Result:

No more leaks
This commit is contained in:
Norman Maurer 2021-08-20 19:10:54 +02:00 committed by GitHub
parent 33b63c325f
commit 9d25bc8a4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,6 +66,7 @@ public class TcpDnsTest {
assertThat(readResponse.<DnsRawRecord>recordAt(DnsSection.ANSWER).content(), is(record.content())); assertThat(readResponse.<DnsRawRecord>recordAt(DnsSection.ANSWER).content(), is(record.content()));
ReferenceCountUtil.release(readResponse); ReferenceCountUtil.release(readResponse);
ReferenceCountUtil.release(record); ReferenceCountUtil.release(record);
query.release();
assertFalse(channel.finish()); assertFalse(channel.finish());
} }