From 6150b320c7045f16841750b3f2294a44a4a8cc3c Mon Sep 17 00:00:00 2001 From: Martin Nagy Date: Wed, 4 Nov 2009 18:19:31 +0100 Subject: Fix a bad free in async_resolv.c Also remove redundant talloc_free()'s. They are not needed since their parent should be freed right after calling the _recv() function. --- server/resolv/async_resolv.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/server/resolv/async_resolv.c b/server/resolv/async_resolv.c index c13fd878..f567a398 100644 --- a/server/resolv/async_resolv.c +++ b/server/resolv/async_resolv.c @@ -411,8 +411,6 @@ resolv_gethostbyname_recv(TALLOC_CTX *mem_ctx, struct tevent_req *req, *timeouts = state->timeouts; if (hostent) *hostent = talloc_steal(mem_ctx, state->hostent); - else - talloc_free(hostent); if (tevent_req_is_error(req, &tstate, &err)) { return -1; @@ -595,8 +593,6 @@ resolv_getsrv_recv(TALLOC_CTX *mem_ctx, struct tevent_req *req, int *status, *timeouts = state->timeouts; if (reply_list) *reply_list = talloc_steal(mem_ctx, state->reply_list); - else - talloc_free(state->reply_list); if (num_replies) *num_replies = state->num_replies; @@ -779,8 +775,6 @@ resolv_gettxt_recv(TALLOC_CTX *mem_ctx, struct tevent_req *req, int *status, *timeouts = state->timeouts; if (reply_list) *reply_list = talloc_steal(mem_ctx, state->reply_list); - else - talloc_free(state->reply_list); if (num_replies) *num_replies = state->num_replies; -- cgit