]> git.sur5r.net Git - openldap/commitdiff
tool_bind(): Do not use pointer to out-of-scope variable (ITS#4434, ppolicy)
authorHallvard Furuseth <hallvard@openldap.org>
Tue, 4 Apr 2006 03:20:33 +0000 (03:20 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Tue, 4 Apr 2006 03:20:33 +0000 (03:20 +0000)
clients/tools/common.c

index 613bfb7b1ad87de449d5d884c52c062f50986efb..0369e3dcb74281cce7fde5d227bfac26ae94cb1b 100644 (file)
@@ -1001,8 +1001,8 @@ tool_bind( LDAP *ld )
        int             nsctrls = 0;
 
 #ifdef LDAP_CONTROL_PASSWORDPOLICYREQUEST
+       LDAPControl c;
        if ( ppolicy ) {
-               LDAPControl c;
                c.ldctl_oid = LDAP_CONTROL_PASSWORDPOLICYREQUEST;
                c.ldctl_value.bv_val = NULL;
                c.ldctl_value.bv_len = 0;