reverse debug changes
@@ -3473,15 +3473,11 @@ open_resolve_cb(struct neat_resolver_results *results, uint8_t code,
}
struct neat_he_candidate *candidate = calloc(1, sizeof(*candidate));
- if (!candidate) {
- nt_free_candidates(ctx, candidates);
+ if (!candidate)
return NEAT_ERROR_OUT_OF_MEMORY;
- }
-
candidate->pollable_socket = calloc(1, sizeof(struct neat_pollable_socket));
if (!candidate->pollable_socket) {
free(candidate);
- nt_free_candidates(ctx, candidates);
return NEAT_ERROR_OUT_OF_MEMORY;
}
@@ -3496,7 +3492,6 @@ open_resolve_cb(struct neat_resolver_results *results, uint8_t code,
if (!candidate->if_name) {
free(candidate->pollable_socket);
free(candidate);
- nt_free_candidates(ctx, candidates);
return NEAT_ERROR_OUT_OF_MEMORY;
}
candidate->if_idx = result->if_idx;
@@ -3508,7 +3503,6 @@ open_resolve_cb(struct neat_resolver_results *results, uint8_t code,
free(candidate->if_name);
free(candidate->pollable_socket);
free(candidate);
- nt_free_candidates(ctx, candidates);
return NEAT_ERROR_OUT_OF_MEMORY;
}
candidate->pollable_socket->dst_address = strdup(dst_buffer);
@@ -3517,7 +3511,6 @@ open_resolve_cb(struct neat_resolver_results *results, uint8_t code,
free(candidate->if_name);
free(candidate->pollable_socket);
free(candidate);
- nt_free_candidates(ctx, candidates);
return NEAT_ERROR_OUT_OF_MEMORY;
}
candidate->pollable_socket->port = flow->port;
@@ -3574,7 +3567,6 @@ open_resolve_cb(struct neat_resolver_results *results, uint8_t code,
candidate->pollable_socket->src_address = strdup(src_buffer);
if (!candidate->pollable_socket->src_address) {
free(candidate);
- nt_free_candidates(ctx, candidates);
return NEAT_ERROR_OUT_OF_MEMORY;
}
@@ -3588,7 +3580,6 @@ open_resolve_cb(struct neat_resolver_results *results, uint8_t code,
free(candidate->if_name);
free(candidate->pollable_socket);
free(candidate);
- nt_free_candidates(ctx, candidates);
return NEAT_ERROR_OUT_OF_MEMORY;
}
candidate->pollable_socket->dst_len = result->dst_addr_len;
