initialize acct_ctrl before using it
authorHerb Lewis <herb@samba.org>
Wed, 15 Jan 2003 16:44:35 +0000 (16:44 +0000)
committerHerb Lewis <herb@samba.org>
Wed, 15 Jan 2003 16:44:35 +0000 (16:44 +0000)
remove ldap_msgfree(result); as result is unitialized at this point

source/passdb/pdb_ldap.c

index 72b3ef818e278ea5365b5cfb88418908934ba2a8..e98a2cf04ffec5a8a310b98a39f951b46bff2298 100644 (file)
@@ -914,7 +914,7 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state,
                        group_rid;
        uint8           smblmpwd[LM_HASH_LEN],
                        smbntpwd[NT_HASH_LEN];
-       uint16          acct_ctrl, 
+       uint16          acct_ctrl = 0
                        logon_divs;
        uint32 hours_len;
        uint8           hours[MAX_HOURS_LEN];
@@ -1794,7 +1794,6 @@ static NTSTATUS ldapsam_update_sam_account(struct pdb_methods *my_methods, SAM_A
 
        if (!init_ldap_from_sam(ldap_state, &mods, LDAP_MOD_REPLACE, False, newpwd)) {
                DEBUG(0, ("ldapsam_update_sam_account: init_ldap_from_sam failed!\n"));
-               ldap_msgfree(result);
                return NT_STATUS_UNSUCCESSFUL;
        }