relay: We might be noting down an unknown DNS error type

Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
David Goulet 2021-05-12 14:44:04 -04:00
parent 3fbd510c52
commit d4718e4db9

View File

@ -325,7 +325,8 @@ void
rep_hist_note_dns_error(int type, uint8_t error)
{
dns_stats_t *dns_stats = get_dns_stats_by_type(type);
if (BUG(!dns_stats)) {
/* Unsupported DNS query type. */
if (!dns_stats) {
return;
}