summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap.h
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2010-04-29 12:42:59 -0400
committerStephen Gallagher <sgallagh@redhat.com>2010-05-03 13:52:10 -0400
commit6c8223ed11b46e44187b7f2ff201d68393b8c32e (patch)
tree1c21f10040288b8d9ab62e49ecfa6c3f8aa1b214 /src/providers/ldap/sdap.h
parent270a0a1b6182ef1fbff2a93af6731788cf954874 (diff)
downloadsssd-6c8223ed11b46e44187b7f2ff201d68393b8c32e.tar.gz
sssd-6c8223ed11b46e44187b7f2ff201d68393b8c32e.tar.xz
sssd-6c8223ed11b46e44187b7f2ff201d68393b8c32e.zip
Avoid freeing sdap_handle too early
Prevent freeing the sdap_handle by failing in the destructor if we are trying to recurse.
Diffstat (limited to 'src/providers/ldap/sdap.h')
-rw-r--r--src/providers/ldap/sdap.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/providers/ldap/sdap.h b/src/providers/ldap/sdap.h
index aca98457d..1445e8eea 100644
--- a/src/providers/ldap/sdap.h
+++ b/src/providers/ldap/sdap.h
@@ -74,6 +74,12 @@ struct sdap_handle {
struct sdap_fd_events *sdap_fd_events;
struct sdap_op *ops;
+
+ /* during release we need to lock access to the handler
+ * from the destructor to avoid recursion */
+ bool destructor_lock;
+ /* mark when it is safe to finally release the handler memory */
+ bool release_memory;
};
struct sdap_service {