From: Howard Chu Date: Tue, 13 Feb 2007 11:03:16 +0000 (+0000) Subject: Coverity scan - saved attr may not exist for a Replace X-Git-Tag: OPENLDAP_REL_ENG_2_4_4ALPHA~8^2~8 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=aa19286296d02628215b38e66b7a630443a971b9;p=openldap Coverity scan - saved attr may not exist for a Replace --- diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index ecd3bab137..c01ec584a5 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -4803,7 +4803,8 @@ config_modify_internal( CfEntryInfo *ce, Operation *op, SlapReply *rs, ca->valx = d->idx[i]; rc = config_del_vals( ct, ca ); if ( rc != LDAP_SUCCESS ) break; - s->a_flags |= SLAP_ATTR_IXDEL; + if ( s ) + s->a_flags |= SLAP_ATTR_IXDEL; for (j=i+1; j < d->nidx; j++) if ( d->idx[j] >d->idx[i] ) d->idx[j]--; @@ -4813,7 +4814,8 @@ config_modify_internal( CfEntryInfo *ce, Operation *op, SlapReply *rs, ca->line = NULL; rc = config_del_vals( ct, ca ); if ( rc ) rc = LDAP_OTHER; - s->a_flags |= SLAP_ATTR_IXDEL; + if ( s ) + s->a_flags |= SLAP_ATTR_IXDEL; } if ( ml->sml_values ) { d = d->next;