analyzer/protocol/dns: change runtime check to assert()

If it were legal to call SendReplyOrRejectEvent() without an
EventHandlerPtr, then this would leak the `question_name` object.  But
this method has just one caller, and it verifies the EventHandlerPtr.
This commit is contained in:
Max Kellermann 2020-02-16 19:11:10 +01:00
parent dd377fffba
commit aac3de576f

View file

@ -1415,7 +1415,8 @@ void DNS_Interpreter::SendReplyOrRejectEvent(DNS_MsgInfo* msg,
RR_Type qtype = RR_Type(ExtractShort(data, len)); RR_Type qtype = RR_Type(ExtractShort(data, len));
int qclass = ExtractShort(data, len); int qclass = ExtractShort(data, len);
if ( event ) assert(event);
analyzer->ConnectionEventFast(event, { analyzer->ConnectionEventFast(event, {
analyzer->BuildConnVal(), analyzer->BuildConnVal(),
msg->BuildHdrVal(), msg->BuildHdrVal(),