]> git.sur5r.net Git - openldap/commitdiff
coverity cleanup
authorHoward Chu <hyc@openldap.org>
Tue, 9 May 2006 10:41:05 +0000 (10:41 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 9 May 2006 10:41:05 +0000 (10:41 +0000)
servers/slapd/bconfig.c
servers/slapd/overlays/dynlist.c

index 60b888b3beafd3d1e10adad69ef44853492cb8fd..551e9d790342042316d99f18a2a8ed650c910cc9 100644 (file)
@@ -3619,8 +3619,8 @@ config_add_internal( CfBackInfo *cfb, Entry *e, ConfigArgs *ca, SlapReply *rs,
                /* No parent, must be root. This will never happen... */
                if ( !last && !be_isroot( op ) && !be_shadow_update( op ))
                        return LDAP_NO_SUCH_OBJECT;
-               if ( !access_allowed( op, last->ce_entry, slap_schema.si_ad_children,
-                       NULL, ACL_WADD, NULL ))
+               if ( last && !access_allowed( op, last->ce_entry,
+                       slap_schema.si_ad_children, NULL, ACL_WADD, NULL ))
                        return LDAP_INSUFFICIENT_ACCESS;
        }
 
index 163e4daa8552eb3e22b14ce2abfed20d046d5fb4..a679e16f6e53e96e4f06272ad95b5a783119ed03 100644 (file)
@@ -475,9 +475,7 @@ cleanup:;
                        op->o_tmpfree( o.ors_filterstr.bv_val, op->o_tmpmemctx );
                        lud->lud_filter = NULL;
                }
-               if ( lud ) {
-                       ldap_free_urldesc( lud );
-               }
+               ldap_free_urldesc( lud );
        }
 
        rs->sr_entry = e;