summaryrefslogtreecommitdiffstats
path: root/src/providers/ipa
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2010-04-29 12:30:05 -0400
committerStephen Gallagher <sgallagh@redhat.com>2010-05-03 13:53:19 -0400
commit601545ddd3f65e819de307214fdde8a9181be366 (patch)
tree51219018d71a4631dbf9be2982f4236aacbf9b13 /src/providers/ipa
parent0ab5413bbbafe05c2a61d42b24e1842848bf78c2 (diff)
downloadsssd-601545ddd3f65e819de307214fdde8a9181be366.tar.gz
sssd-601545ddd3f65e819de307214fdde8a9181be366.tar.xz
sssd-601545ddd3f65e819de307214fdde8a9181be366.zip
Better handle sdap_handle memory from callers.
Always just mark the sdap_handle as not connected and let later _send() functions to take care of freeing the handle before reconnecting. Introduce restart functions to avoid calling _send() functions in _done() functions error paths as this would have the same effect as directly freeing the sdap_handle and cause access to freed memory in sdap_handle_release() By freeing sdap_handle only in the connection _recv() function we guarantee it can never be done within sdap_handle_release() but only in a following event.
Diffstat (limited to 'src/providers/ipa')
-rw-r--r--src/providers/ipa/ipa_access.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/providers/ipa/ipa_access.c b/src/providers/ipa/ipa_access.c
index 55a7133ca..83bcb0c95 100644
--- a/src/providers/ipa/ipa_access.c
+++ b/src/providers/ipa/ipa_access.c
@@ -432,10 +432,6 @@ static struct tevent_req *hbac_get_host_info_send(TALLOC_CTX *memctx,
}
if (sdap_ctx->gsh == NULL || ! sdap_ctx->gsh->connected) {
- if (sdap_ctx->gsh != NULL) {
- talloc_zfree(sdap_ctx->gsh);
- }
-
subreq = sdap_cli_connect_send(state, ev, sdap_ctx->opts,
sdap_ctx->be, sdap_ctx->service, NULL);
if (!subreq) {
@@ -941,10 +937,6 @@ static struct tevent_req *hbac_get_rules_send(TALLOC_CTX *memctx,
}
if (sdap_ctx->gsh == NULL || ! sdap_ctx->gsh->connected) {
- if (sdap_ctx->gsh != NULL) {
- talloc_zfree(sdap_ctx->gsh);
- }
-
subreq = sdap_cli_connect_send(state, ev, sdap_ctx->opts,
sdap_ctx->be, sdap_ctx->service, NULL);
if (!subreq) {