From 77cacd96c1648373939a0bf3a4cba81b42cafda3 Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: Mar 15 2012 16:46:23 +0000 Subject: coverity 12606 Logically dead code The previous fix (commit 325abca7135d06225adf5380d726de60dacda5a4) for "Ticket #303 - make DNA range requests work with transactions" introduced this dead code. Since dna_pre_op does not allocate an entry "e", there is no need to check the flag "free_entry" and free it. Reviewed by mareynol@redhat.com (Thanks, Mark!!). --- diff --git a/ldap/servers/plugins/dna/dna.c b/ldap/servers/plugins/dna/dna.c index c744e0a..ce2486e 100644 --- a/ldap/servers/plugins/dna/dna.c +++ b/ldap/servers/plugins/dna/dna.c @@ -3214,7 +3214,6 @@ dna_pre_op(Slapi_PBlock * pb, int modtype) char *dn = NULL; Slapi_Mods *smods = NULL; LDAPMod **mods; - int free_entry = 0; int ret = 0; slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM, @@ -3308,9 +3307,6 @@ dna_pre_op(Slapi_PBlock * pb, int modtype) slapi_mods_free(&smods); } bail: - if (free_entry && e) - slapi_entry_free(e); - if (resulting_e) slapi_entry_free(resulting_e);