]> git.sur5r.net Git - openldap/commitdiff
Fix prev commit
authorHoward Chu <hyc@openldap.org>
Tue, 30 Jun 2009 11:54:45 +0000 (11:54 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 30 Jun 2009 11:54:45 +0000 (11:54 +0000)
servers/slapd/overlays/ppolicy.c

index 460d20b82f1981695512298209bc1ae5da936c81..10870f3755ef9c30e661703eb3032aceb23132ad 100644 (file)
@@ -592,6 +592,9 @@ check_password_quality( struct berval *cred, PassPolicy *pp, LDAPPasswordPolicyE
 
        assert( cred != NULL );
        assert( pp != NULL );
+       assert( txt != NULL );
+
+       *txt = NULL;
 
        if ((cred->bv_len == 0) || (pp->pwdMinLength > cred->bv_len)) {
                rc = LDAP_CONSTRAINT_VIOLATION;
@@ -658,7 +661,6 @@ check_password_quality( struct berval *cred, PassPolicy *pp, LDAPPasswordPolicyE
                                        pp->pwdCheckModule, err, 0 );
                                ok = LDAP_OTHER;
                        } else {
-                               *txt = NULL;
                                ldap_pvt_thread_mutex_lock( &chk_syntax_mutex );
                                ok = prog( ptr, txt, e );
                                ldap_pvt_thread_mutex_unlock( &chk_syntax_mutex );