Fix missing ResourceLeak.close() in AbstractDnsMessage
Motivation: ResourceLeak.close() must be called when a reference-counted resource is deallocated, but AbstractDnsMessage.deallocate() forgot to call it. Modifications: Call ResourceLeak.close() for the tracked AbstractDnsMessage instances Result: Fix the false resource leak warnings
This commit is contained in:
parent
410aa427be
commit
3064e6dba8
@ -375,6 +375,11 @@ public abstract class AbstractDnsMessage extends AbstractReferenceCounted implem
|
||||
@Override
|
||||
protected void deallocate() {
|
||||
clear();
|
||||
|
||||
final ResourceLeak leak = this.leak;
|
||||
if (leak != null) {
|
||||
leak.close();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user