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)
committerKarolin Seeger <kseeger@samba.org>
Mon, 4 Jul 2011 19:44:51 +0000 (21:44 +0200)
source3/lib/smbldap.c

index 7cd14848d6b4db941c3eed349ce0c5dd31c2a5eb..31a16b6a19575ce63730097956ced785c5fe4d0f 100644 (file)
@@ -1847,8 +1847,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 */
 }