From 0a43acc732cd1e8b8f7eaac55c85e34b39a93eb5 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 9 May 2006 10:41:05 +0000 Subject: [PATCH] coverity cleanup --- servers/slapd/bconfig.c | 4 ++-- servers/slapd/overlays/dynlist.c | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) 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; -- 2.39.5