]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldap/add.c
RFC 4511 calls for unavailableCriticalExtension to returned when
[openldap] / servers / slapd / back-ldap / add.c
index 62a6ca8efcf3a8e2fb9aa6a7ce89d0c7ec071911..9d6d0fc22c5456d21d3d0bf3a65fa69f22ef972b 100644 (file)
@@ -38,7 +38,7 @@ ldap_back_add(
 {
        ldapinfo_t              *li = (ldapinfo_t *)op->o_bd->be_private;
 
-       ldapconn_t              *lc;
+       ldapconn_t              *lc = NULL;
        int                     i = 0,
                                j = 0;
        Attribute               *a;
@@ -54,8 +54,7 @@ ldap_back_add(
        Debug( LDAP_DEBUG_ARGS, "==> ldap_back_add(\"%s\")\n",
                        op->o_req_dn.bv_val, 0, 0 );
 
-       lc = ldap_back_getconn( op, rs, LDAP_BACK_SENDERR );
-       if ( !lc || !ldap_back_dobind( lc, op, rs, LDAP_BACK_SENDERR ) ) {
+       if ( !ldap_back_dobind( &lc, op, rs, LDAP_BACK_SENDERR ) ) {
                lc = NULL;
                goto cleanup;
        }