Bug 630094

Summary: fix coverity Defect Type: Control flow issues
Product: [Retired] 389 Reporter: Nathan Kinder <nkinder>
Component: Directory ServerAssignee: Nathan Kinder <nkinder>
Status: CLOSED CURRENTRELEASE QA Contact: Chandrasekar Kannan <ckannan>
Severity: medium Docs Contact:
Priority: high    
Version: 1.2.6CC: amsharma, benl, jgalipea
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-17 14:08:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 639035    
Attachments:
Description Flags
Patch for cov#11818
nhosoi: review+, nkinder: review?
Patch for cov#15451
nhosoi: review+, nkinder: review?
Patch for cov#15452
nhosoi: review+, nkinder: review?
Patch for cov#15453
nhosoi: review+, nkinder: review?
Patch for cov#15454
nhosoi: review+, nkinder: review?
Patch for cov#15455
nhosoi: review+, nkinder: review?
Patch for cov#15456
nhosoi: review+, nkinder: review?
Patch for cov#15457
nhosoi: review+, nkinder: review?
Patch for cov#15458
nhosoi: review+, nkinder: review?
Patch for cov#15459
nhosoi: review+, nkinder: review?
Patch for cov#15520
nhosoi: review+, nkinder: review?
Patch for cov#15581 nhosoi: review+, nkinder: review?

Description Nathan Kinder 2010-09-03 17:17:44 UTC
fix coverity Defect Type: Memory - Control flow issues

Comment 2 Nathan Kinder 2010-09-08 21:05:29 UTC
Created attachment 446084 [details]
Patch for cov#11818

Comment 3 Nathan Kinder 2010-09-08 21:19:39 UTC
Created attachment 446087 [details]
Patch for cov#15451

Comment 4 Nathan Kinder 2010-09-08 21:41:29 UTC
Created attachment 446093 [details]
Patch for cov#15452

Comment 5 Nathan Kinder 2010-09-08 21:52:53 UTC
Created attachment 446094 [details]
Patch for cov#15453

Comment 6 Nathan Kinder 2010-09-08 22:12:53 UTC
Created attachment 446095 [details]
Patch for cov#15454

Comment 7 Nathan Kinder 2010-09-08 22:43:37 UTC
Created attachment 446098 [details]
Patch for cov#15455

Comment 8 Nathan Kinder 2010-09-08 22:50:01 UTC
Created attachment 446099 [details]
Patch for cov#15456

Comment 9 Nathan Kinder 2010-09-08 22:56:40 UTC
Created attachment 446101 [details]
Patch for cov#15457

Comment 10 Nathan Kinder 2010-09-09 15:04:18 UTC
Created attachment 446270 [details]
Patch for cov#15458

Comment 11 Nathan Kinder 2010-09-09 15:15:34 UTC
Created attachment 446273 [details]
Patch for cov#15459

Comment 12 Nathan Kinder 2010-09-09 15:27:19 UTC
Created attachment 446279 [details]
Patch for cov#15520

Comment 13 Noriko Hosoi 2010-09-09 20:32:58 UTC
Comment on attachment 446098 [details]
Patch for cov#15455

Let me ask you to confirm one thing since it's a bit hard to see on the diff...  The following checking still exists after "if ( argc > 1 )" clause, doesn't it?  With the assumption, I put '+'. :)

    196         if (!indexes) {
    197                 LDAPDebug(LDAP_DEBUG_ANY, "attr_index_config: Missing in        dex\n", 0, 0, 0);
    198                 goto done;
    199         }
    200

Comment 14 Nathan Kinder 2010-09-09 20:46:22 UTC
(In reply to comment #13)
> Comment on attachment 446098 [details]
> Patch for cov#15455
> 
> Let me ask you to confirm one thing since it's a bit hard to see on the diff...
>  The following checking still exists after "if ( argc > 1 )" clause, doesn't
> it?  With the assumption, I put '+'. :)
> 
>     196         if (!indexes) {
>     197                 LDAPDebug(LDAP_DEBUG_ANY, "attr_index_config: Missing
> in        dex\n", 0, 0, 0);
>     198                 goto done;
>     199         }
>     200

Yes, this check is still performed immediately after the "if (argc > 1)" block is finished.

Comment 15 Nathan Kinder 2010-09-09 20:54:17 UTC
Pushed patches to master.  Thanks to Noriko for her reviews!

Counting objects: 93, done.
Delta compression using 2 threads.
Compressing objects: 100% (75/75), done.
Writing objects: 100% (75/75), 9.79 KiB, done.
Total 75 (delta 53), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
   07d7c89..660629d  master -> master

Comment 16 Nathan Kinder 2010-09-09 22:00:33 UTC
Created attachment 446382 [details]
Patch for cov#15581

Comment 17 Noriko Hosoi 2010-09-09 22:09:06 UTC
Comment on attachment 446382 [details]
Patch for cov#15581

Ah, I see...  Sorry, I also missed them when I reviewed the previous fix...

Comment 18 Nathan Kinder 2010-09-09 22:15:05 UTC
Pushed additional patch to master.  Thanks to Noriko for her review!

Counting objects: 19, done.
Delta compression using 2 threads.
Compressing objects: 100% (11/11), done.
Writing objects: 100% (11/11), 1.29 KiB, done.
Total 11 (delta 8), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
   660629d..b2799df  master -> master

Comment 19 Amita Sharma 2011-05-13 07:01:20 UTC
Coverity Related, Can I request Dev to test this.