if (req)
request_submit(req);
} else {
- req = search_request_new(base, handle, TYPE_A, name, flags,
- callback, ptr);
+ search_request_new(base, handle, TYPE_A, name, flags,
+ callback, ptr);
+ }
+ if (handle->current_req == NULL) {
+ mm_free(handle);
+ handle = NULL;
}
EVDNS_UNLOCK(base);
return handle;
if (req)
request_submit(req);
} else {
- req = search_request_new(base, handle, TYPE_AAAA, name, flags,
- callback, ptr);
+ search_request_new(base, handle, TYPE_AAAA, name, flags,
+ callback, ptr);
+ }
+ if (handle->current_req == NULL) {
+ mm_free(handle);
+ handle = NULL;
}
EVDNS_UNLOCK(base);
return handle;
req = request_new(base, handle, TYPE_PTR, buf, flags, callback, ptr);
if (req)
request_submit(req);
+ if (handle->current_req == NULL) {
+ mm_free(handle);
+ handle = NULL;
+ }
EVDNS_UNLOCK(base);
return (handle);
}
req = request_new(base, handle, TYPE_PTR, buf, flags, callback, ptr);
if (req)
request_submit(req);
+ if (handle->current_req == NULL) {
+ mm_free(handle);
+ handle = NULL;
+ }
EVDNS_UNLOCK(base);
return (handle);
}