s3:smbldap: let smbldap_free_struct do what it claims to
authorGregor Beck <gbeck@sernet.de>
Tue, 21 Jun 2011 06:02:53 +0000 (08:02 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 1 Jul 2011 09:23:49 +0000 (11:23 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/lib/smbldap.c

index 76d2899e501995ec03db57ddcf141c2a3f21b95d..41ba0e1b442f0f89356e4888dacd0e8a087ae507 100644 (file)
@@ -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 */
 }