Merge remote-tracking branch 'origin/patches-2.0'

This commit is contained in:
Nick Mathewson 2012-09-12 20:19:22 -04:00
commit 8827dbc3e9

View File

@ -2296,7 +2296,10 @@ nameserver_send_probe(struct nameserver *const ns) {
handle = mm_calloc(1, sizeof(*handle)); handle = mm_calloc(1, sizeof(*handle));
if (!handle) return; if (!handle) return;
req = request_new(ns->base, handle, TYPE_A, "google.com", DNS_QUERY_NO_SEARCH, nameserver_probe_callback, ns); req = request_new(ns->base, handle, TYPE_A, "google.com", DNS_QUERY_NO_SEARCH, nameserver_probe_callback, ns);
if (!req) return; if (!req) {
mm_free(handle);
return;
}
ns->probe_request = handle; ns->probe_request = handle;
/* we force this into the inflight queue no matter what */ /* we force this into the inflight queue no matter what */
request_trans_id_set(req, transaction_id_pick(ns->base)); request_trans_id_set(req, transaction_id_pick(ns->base));
@ -3160,6 +3163,8 @@ search_request_new(struct evdns_base *base, struct evdns_request *handle,
handle->search_origname = mm_strdup(name); handle->search_origname = mm_strdup(name);
if (handle->search_origname == NULL) { if (handle->search_origname == NULL) {
/* XXX Should we dealloc req? If yes, how? */ /* XXX Should we dealloc req? If yes, how? */
if (req)
mm_free(req);
return NULL; return NULL;
} }
handle->search_state = base->global_search_state; handle->search_state = base->global_search_state;