diff options
author | Simo Sorce <ssorce@redhat.com> | 2010-04-29 12:42:59 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-05-03 13:52:10 -0400 |
commit | 6c8223ed11b46e44187b7f2ff201d68393b8c32e (patch) | |
tree | 1c21f10040288b8d9ab62e49ecfa6c3f8aa1b214 /src/providers/ldap/sdap.h | |
parent | 270a0a1b6182ef1fbff2a93af6731788cf954874 (diff) | |
download | sssd-6c8223ed11b46e44187b7f2ff201d68393b8c32e.tar.gz sssd-6c8223ed11b46e44187b7f2ff201d68393b8c32e.tar.bz2 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.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/providers/ldap/sdap.h b/src/providers/ldap/sdap.h index aca98457..1445e8ee 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 { |