From 40cbfa6cc5f5781cfe4a3bd41f6acd648bf1e23e Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: Fri, 2 Jul 2010 11:46:21 -0700 Subject: 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. --- ldap/servers/plugins/dna/dna.c | 6 ++---- 1 file 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"); -- cgit