mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-28 13:49:01 +08:00
Check for null in DNS handler
PUBLISHED_FROM=e8b719d491688032e6395b75d5859ffad7d7ea23
This commit is contained in:
parent
083d398631
commit
56c687b39b
@ -9357,10 +9357,14 @@ static void mg_resolve_async_eh(struct mg_connection *nc, int ev, void *data) {
|
||||
struct mg_resolve_async_request *req;
|
||||
struct mg_dns_message *msg;
|
||||
|
||||
DBG(("ev=%d", ev));
|
||||
DBG(("ev=%d user_data=%p", ev, nc->user_data));
|
||||
|
||||
req = (struct mg_resolve_async_request *) nc->user_data;
|
||||
|
||||
if (req == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (ev) {
|
||||
case MG_EV_CONNECT:
|
||||
case MG_EV_POLL:
|
||||
|
Loading…
Reference in New Issue
Block a user