Skip to content
This repository
Browse code

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

  • Loading branch information...
commit 8827dbc3e9f0135d4c88a8ed803c7cabe16f94b8 2 parents ffe1643 + f2bff75
Nick Mathewson authored

Showing 1 changed file with 6 additions and 1 deletion. Show diff stats Hide diff stats

  1. +6 1 evdns.c
7 evdns.c
@@ -2296,7 +2296,10 @@ nameserver_send_probe(struct nameserver *const ns) {
2296 2296 handle = mm_calloc(1, sizeof(*handle));
2297 2297 if (!handle) return;
2298 2298 req = request_new(ns->base, handle, TYPE_A, "google.com", DNS_QUERY_NO_SEARCH, nameserver_probe_callback, ns);
2299   - if (!req) return;
  2299 + if (!req) {
  2300 + mm_free(handle);
  2301 + return;
  2302 + }
2300 2303 ns->probe_request = handle;
2301 2304 /* we force this into the inflight queue no matter what */
2302 2305 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,
3160 3163 handle->search_origname = mm_strdup(name);
3161 3164 if (handle->search_origname == NULL) {
3162 3165 /* XXX Should we dealloc req? If yes, how? */
  3166 + if (req)
  3167 + mm_free(req);
3163 3168 return NULL;
3164 3169 }
3165 3170 handle->search_state = base->global_search_state;

0 comments on commit 8827dbc

Please sign in to comment.
Something went wrong with that request. Please try again.