diff options
author | Gregor Beck <gbeck@sernet.de> | 2011-06-21 08:06:28 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-07-01 11:23:56 +0200 |
commit | 6aff8b19fcdbf694cc8dbd388f87e55cce475939 (patch) | |
tree | a214947fa9b8d2496ec84af0abf0fa2a9ce8f5c7 /source3/lib | |
parent | 796c7ab282f11ad46bb5e90d721c54223045540f (diff) | |
download | samba-6aff8b19fcdbf694cc8dbd388f87e55cce475939.tar.gz samba-6aff8b19fcdbf694cc8dbd388f87e55cce475939.tar.bz2 samba-6aff8b19fcdbf694cc8dbd388f87e55cce475939.zip |
s3:smbldap: add a destructor to smbldap_state, just in case
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/smbldap.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c index 41ba0e1b44..1fbefbf2d5 100644 --- a/source3/lib/smbldap.c +++ b/source3/lib/smbldap.c @@ -1853,6 +1853,12 @@ void smbldap_free_struct(struct smbldap_state **ldap_state) /* No need to free any further, as it is talloc()ed */ } +static int smbldap_state_destructor(struct smbldap_state *state) +{ + smbldap_free_struct(&state); + return 0; +} + /********************************************************************** Intitalise the 'general' ldap structures, on which ldap operations may be conducted @@ -1876,6 +1882,7 @@ NTSTATUS smbldap_init(TALLOC_CTX *mem_ctx, struct event_context *event_ctx, (*smbldap_state)->event_context = event_ctx; + talloc_set_destructor(*smbldap_state, smbldap_state_destructor); return NT_STATUS_OK; } |