summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Nagy <mnagy@redhat.com>2009-11-04 18:19:31 +0100
committerSimo Sorce <ssorce@redhat.com>2009-11-06 17:43:13 -0500
commit6150b320c7045f16841750b3f2294a44a4a8cc3c (patch)
treefcb16ce79d4c2b03639cac34e17badae09e7ada7
parent4cdd4130b200e46043d0550244f9d030169af55e (diff)
downloadsssd-6150b320c7045f16841750b3f2294a44a4a8cc3c.tar.gz
sssd-6150b320c7045f16841750b3f2294a44a4a8cc3c.tar.bz2
sssd-6150b320c7045f16841750b3f2294a44a4a8cc3c.zip
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.
-rw-r--r--server/resolv/async_resolv.c6
1 files changed, 0 insertions, 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;