Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/patches-2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
nmathewson committed Sep 13, 2012
2 parents ffe1643 + f2bff75 commit 8827dbc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion evdns.c
Original file line number Diff line number Diff line change
Expand Up @@ -2296,7 +2296,10 @@ nameserver_send_probe(struct nameserver *const ns) {
handle = mm_calloc(1, sizeof(*handle));
if (!handle) return;
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;
/* we force this into the inflight queue no matter what */
request_trans_id_set(req, transaction_id_pick(ns->base));
Expand Down Expand Up @@ -3160,6 +3163,8 @@ search_request_new(struct evdns_base *base, struct evdns_request *handle,
handle->search_origname = mm_strdup(name);
if (handle->search_origname == NULL) {
/* XXX Should we dealloc req? If yes, how? */
if (req)
mm_free(req);
return NULL;
}
handle->search_state = base->global_search_state;
Expand Down

0 comments on commit 8827dbc

Please sign in to comment.