]> git.sur5r.net Git - openldap/commitdiff
Fix bogus assert.
authorKurt Zeilenga <kurt@openldap.org>
Fri, 31 May 2002 20:23:33 +0000 (20:23 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 31 May 2002 20:23:33 +0000 (20:23 +0000)
servers/slapd/passwd.c

index 3a8ddd9c1dce03b616542d9c6722393ac9fc2d99..94cbeac0cf2d7631efd2376b40dd7655c4cde281 100644 (file)
@@ -321,13 +321,17 @@ slap_passwd_hash(
 #endif
 
        tmp = lutil_passwd_hash( cred , hash );
-       assert( tmp != NULL );
        
 #if defined( SLAPD_CRYPT ) || defined( SLAPD_SPASSWD )
        ldap_pvt_thread_mutex_unlock( &passwd_mutex );
 #endif
+
+       if( tmp == NULL ) {
+               new->bv_len = 0;
+               new->bv_val = NULL;
+       }
+
        *new = *tmp;
        free( tmp );
-
        return;
 }