]> git.sur5r.net Git - openldap/commitdiff
check return value
authorPierangelo Masarati <ando@openldap.org>
Sat, 1 Jan 2011 16:10:23 +0000 (16:10 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 1 Jan 2011 16:10:23 +0000 (16:10 +0000)
contrib/slapd-modules/vc/vc.c

index 219f62be5e30e2ffb4db0e8d1219797939055e7b..8a2923dbce5a8ce96e9fe6f1e4ed0f17e508e0d4 100644 (file)
@@ -282,14 +282,20 @@ vc_exop(
        rs->sr_err = frontendDB->be_bind( conn->op, &rs2 );
 
        if ( conn->op->o_conn->c_sasl_bind_in_progress ) {
-               vc_create_response( conn,
+               rc = vc_create_response( conn,
                        !BER_BVISEMPTY( &sasldata ) ? &sasldata : NULL,
                        NULL, &rs->sr_rspdata );
+
        } else {
-               vc_create_response( NULL, NULL,
+               rc = vc_create_response( NULL, NULL,
                        &conn->op->o_conn->c_dn, &rs->sr_rspdata );
        }
 
+       if ( rc != 0 ) {
+               rs->sr_err = LDAP_OTHER;
+               goto done;
+       }
+
        if ( !BER_BVISNULL( &conn->op->o_conn->c_dn ) &&
                conn->op->o_conn->c_dn.bv_val != conn->op->o_conn->c_ndn.bv_val )
                ber_memfree( conn->op->o_conn->c_dn.bv_val );