summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/smbldap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c
index 76d2899e50..41ba0e1b44 100644
--- a/source3/lib/smbldap.c
+++ b/source3/lib/smbldap.c
@@ -1848,8 +1848,7 @@ void smbldap_free_struct(struct smbldap_state **ldap_state)
SAFE_FREE((*ldap_state)->bind_dn);
SAFE_FREE((*ldap_state)->bind_secret);
-
- *ldap_state = NULL;
+ TALLOC_FREE(*ldap_state);
/* No need to free any further, as it is talloc()ed */
}