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
parent f0ffb6ac2e
commit cde132051a

View File

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