Browse Source

Bug 691422 - cl5DeleteRUV - fix coverity control flow issues

https://bugzilla.redhat.com/show_bug.cgi?id=691422
Resolves: bug 691422
Bug Description: cl5DeleteRUV - fix coverity control flow issues
Reviewed by: nhosoi (Thanks!)
Branch: master
Fix Description: move the if (file_obj) clause after the bail: label - I think this
was the intention of the code - if the while loop was bailed, file_obj may be
acquired, so it would have to be released
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
Rich Megginson 14 years ago
parent
commit
e936bd91f9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ldap/servers/plugins/replication/cl5_api.c

+ 1 - 1
ldap/servers/plugins/replication/cl5_api.c

@@ -6401,10 +6401,10 @@ cl5DeleteRUV()
         }
         }
         file_obj = objset_next_obj(s_cl5Desc.dbFiles, file_obj);
         file_obj = objset_next_obj(s_cl5Desc.dbFiles, file_obj);
     }
     }
+bail:
     if (file_obj) {
     if (file_obj) {
         object_release (file_obj);
         object_release (file_obj);
     }
     }
-bail:
     if (closeit && (CL5_STATE_OPEN == s_cl5Desc.dbState)) {
     if (closeit && (CL5_STATE_OPEN == s_cl5Desc.dbState)) {
         _cl5Close ();
         _cl5Close ();
         s_cl5Desc.dbState = CL5_STATE_CLOSED; /* force to change the state */
         s_cl5Desc.dbState = CL5_STATE_CLOSED; /* force to change the state */