X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fcr.c;h=1e75a66fa290a264b23b9c1e12b2bbef03d8a703;hb=d9edc7d5afd2860fac2fa0121044db28d94c9f7f;hp=7fe0ed742f0b281daf6710f2f5694fce41cb4fd3;hpb=4af9eb971559e3a1f0432615e93ec870dc753ddb;p=openldap diff --git a/servers/slapd/cr.c b/servers/slapd/cr.c index 7fe0ed742f..1e75a66fa2 100644 --- a/servers/slapd/cr.c +++ b/servers/slapd/cr.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2009 The OpenLDAP Foundation. + * Copyright 1998-2011 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -120,6 +120,8 @@ cr_insert( struct cindexrec *cir; char **names; + assert( scr != NULL ); + if ( scr->scr_oid ) { cir = (struct cindexrec *) ch_calloc( 1, sizeof(struct cindexrec) ); @@ -127,9 +129,6 @@ cr_insert( cir->cir_name.bv_len = strlen( scr->scr_oid ); cir->cir_cr = scr; - assert( cir->cir_name.bv_val != NULL ); - assert( cir->cir_cr != NULL ); - if ( avl_insert( &cr_index, (caddr_t) cir, cr_index_cmp, avl_dup_error ) ) { @@ -150,9 +149,6 @@ cr_insert( cir->cir_name.bv_len = strlen( *names ); cir->cir_cr = scr; - assert( cir->cir_name.bv_val != NULL ); - assert( cir->cir_cr != NULL ); - if ( avl_insert( &cr_index, (caddr_t) cir, cr_index_cmp, avl_dup_error ) ) {