Google
  Web www.spinics.net

[389-devel] Please review: coverity 12606 Logically dead code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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.
>From 4e0c70fd1a52d4bc943613bc496751fab2e390c0 Mon Sep 17 00:00:00 2001
From: Noriko Hosoi <nhosoi@xxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 15 Mar 2012 09:17:33 -0700
Subject: [PATCH] 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.
---
 ldap/servers/plugins/dna/dna.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

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);
 
-- 
1.7.7.6

--
389-devel mailing list
389-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/389-devel

[Fedora Directory Announce]     [Older Fedora Users Mail]     [Home]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Maintainers]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [iPod Nano]     [ATA RAID]     [Fedora Bible]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Review]     [Fedora Art]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Tux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]

Powered by Linux

Google
  Web www.spinics.net