From: Kurt Zeilenga Date: Mon, 3 Dec 2001 20:05:46 +0000 (+0000) Subject: Add additional sanity check X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~798 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1b91a3872c2bd45687687db0179fe202d15e1af3;p=openldap Add additional sanity check --- diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index 6264636007..783d9ac89f 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -555,7 +555,7 @@ int slap_mods_opattrs( mod->sml_bvalues = (struct berval **) malloc( 2 * sizeof( struct berval * ) ); mod->sml_bvalues[0] = ber_bvdup( &name ); mod->sml_bvalues[1] = NULL; - + assert( mod->sml_bvalues[0] ); *modtail = mod; modtail = &mod->sml_next; @@ -565,6 +565,7 @@ int slap_mods_opattrs( mod->sml_bvalues = (struct berval **) malloc( 2 * sizeof( struct berval * ) ); mod->sml_bvalues[0] = ber_bvdup( ×tamp ); mod->sml_bvalues[1] = NULL; + assert( mod->sml_bvalues[0] ); *modtail = mod; modtail = &mod->sml_next; } @@ -575,6 +576,7 @@ int slap_mods_opattrs( mod->sml_bvalues = (struct berval **) malloc( 2 * sizeof( struct berval * ) ); mod->sml_bvalues[0] = ber_bvdup( &name ); mod->sml_bvalues[1] = NULL; + assert( mod->sml_bvalues[0] ); *modtail = mod; modtail = &mod->sml_next; @@ -584,6 +586,7 @@ int slap_mods_opattrs( mod->sml_bvalues = (struct berval **) malloc( 2 * sizeof( struct berval * ) ); mod->sml_bvalues[0] = ber_bvdup( ×tamp ); mod->sml_bvalues[1] = NULL; + assert( mod->sml_bvalues[0] ); *modtail = mod; modtail = &mod->sml_next;