]> git.sur5r.net Git - openldap/commitdiff
fix previous commit
authorPierangelo Masarati <ando@openldap.org>
Sun, 20 Nov 2005 00:08:50 +0000 (00:08 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sun, 20 Nov 2005 00:08:50 +0000 (00:08 +0000)
servers/slapd/back-ldap/chain.c

index a96c0166e588886065c4788e05b116e19d25452e..367643a67997161c22c5be26929c8ed8a5cbdf22 100644 (file)
@@ -1275,22 +1275,23 @@ ldap_chain_db_init(
        slap_overinst   *on = (slap_overinst *)be->bd_info;
        ldap_chain_t    *lc = NULL;
 
-       int             rc;
-
        if ( lback == NULL ) {
                lback = backend_info( "ldap" );
 
                if ( lback == NULL ) {
-                       return -1;
+                       return 1;
                }
        }
 
        lc = ch_malloc( sizeof( ldap_chain_t ) );
+       if ( lc == NULL ) {
+               return 1;
+       }
        memset( lc, 0, sizeof( ldap_chain_t ) );
 
        on->on_bi.bi_private = (void *)lc;
 
-       return rc;
+       return 0;
 }
 
 static int