]> git.sur5r.net Git - openldap/commitdiff
Coverity scan - saved attr may not exist for a Replace
authorHoward Chu <hyc@openldap.org>
Tue, 13 Feb 2007 11:03:16 +0000 (11:03 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 13 Feb 2007 11:03:16 +0000 (11:03 +0000)
servers/slapd/bconfig.c

index ecd3bab137d3094e168e42f564a28c8ece487321..c01ec584a51ef30757316ade1c5a0b337d663cc4 100644 (file)
@@ -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;