fix crash issue, and fix ping filter issue.

This commit is contained in:
Nick Peng
2019-01-02 22:22:17 +08:00
parent e226f8b80a
commit 4d6dbc6bf1
3 changed files with 51 additions and 17 deletions

View File

@@ -447,7 +447,10 @@ int dns_server_num(void)
void _dns_client_query_get(struct dns_query_struct *query)
{
atomic_inc(&query->refcnt);
if (atomic_inc_return(&query->refcnt) <= 0) {
tlog(TLOG_ERROR, "BUG:query ref is invalid, domain: %s", query->domain);
abort();
}
}
void _dns_client_query_release(struct dns_query_struct *query)