summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2010-07-02 11:46:21 -0700
committerNoriko Hosoi <nhosoi@redhat.com>2010-07-23 13:22:05 -0700
commit40cbfa6cc5f5781cfe4a3bd41f6acd648bf1e23e (patch)
treefe0e48af8935f1bfa021e16c862a8a9e16242975
parent110546612d0e004363cee2dc77fd451967940ebc (diff)
downloadds-40cbfa6cc5f5781cfe4a3bd41f6acd648bf1e23e.tar.gz
ds-40cbfa6cc5f5781cfe4a3bd41f6acd648bf1e23e.tar.xz
ds-40cbfa6cc5f5781cfe4a3bd41f6acd648bf1e23e.zip
610281 - fix coverity Defect Type: Control flow issues
https://bugzilla.redhat.com/show_bug.cgi?id=610281 11802 DEADCODE Triaged Unassigned Bug Minor Ignore dna_get_next_value() ds/ldap/servers/plugins/dna/dna.c Comment: Merged 2 pblock destroy codes slapi_pblock_destroy(pb) to one at the end of the function dna_get_next_value.
-rw-r--r--ldap/servers/plugins/dna/dna.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ldap/servers/plugins/dna/dna.c b/ldap/servers/plugins/dna/dna.c
index dfa86c44..00595463 100644
--- a/ldap/servers/plugins/dna/dna.c
+++ b/ldap/servers/plugins/dna/dna.c
@@ -2016,9 +2016,6 @@ static int dna_get_next_value(struct configEntry *config_entry,
slapi_modify_internal_pb(pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &ret);
-
- slapi_pblock_destroy(pb);
- pb = NULL;
}
if (LDAP_SUCCESS == ret) {
@@ -2036,8 +2033,9 @@ static int dna_get_next_value(struct configEntry *config_entry,
done:
slapi_unlock_mutex(config_entry->lock);
- if (pb)
+ if (pb) {
slapi_pblock_destroy(pb);
+ }
slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_get_next_value\n");