From aa19286296d02628215b38e66b7a630443a971b9 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 13 Feb 2007 11:03:16 +0000 Subject: [PATCH] Coverity scan - saved attr may not exist for a Replace --- servers/slapd/bconfig.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; -- 2.39.5