From: Howard Chu Date: Tue, 9 May 2006 10:41:05 +0000 (+0000) Subject: coverity cleanup X-Git-Tag: OPENLDAP_REL_ENG_2_4_1ALPHA~2^2~67 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0a43acc732cd1e8b8f7eaac55c85e34b39a93eb5;p=openldap coverity cleanup --- diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index 60b888b3be..551e9d7903 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -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; } diff --git a/servers/slapd/overlays/dynlist.c b/servers/slapd/overlays/dynlist.c index 163e4daa85..a679e16f6e 100644 --- a/servers/slapd/overlays/dynlist.c +++ b/servers/slapd/overlays/dynlist.c @@ -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;