ldap/servers/plugins/dna/dna.c | 4 ----
1 file changed, 4 deletions(-)
New commits:
commit 77cacd96c1648373939a0bf3a4cba81b42cafda3
Author: Noriko Hosoi <nhosoi(a)totoro.usersys.redhat.com>
Date: Thu Mar 15 09:46:23 2012 -0700
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(a)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);
Show replies by date