The default bug view has changed. See this FAQ.

Coverity 1150 - dead code in ocsp_CreateCertID

RESOLVED FIXED in 3.12.1

Status

NSS
Libraries
P4
trivial
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: Nelson Bolyard (seldom reads bugmail), Assigned: Julien Pierre)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

743 bytes, patch
Nelson Bolyard (seldom reads bugmail)
: review+
Details | Diff | Splinter Review
Found by Coverity on its last Firefox 3 test run, 2007-May-14 
CID 1150
In function ocsp_CreateCertID, variable tempItem is initialized to NULL

1593 	    SECItem *tempItem = NULL;

and then is not touched again until label loser, where it is checked for NULL.

1665 	    if (tempItem != NULL) {
1666 		SECITEM_FreeItem(tempItem, PR_TRUE);
1667 	    }

That condition can never be true.  It's dead code.  All the lines shown
above should be removed.
(Assignee)

Updated

9 years ago
Assignee: nobody → julien.pierre.boogz
(Assignee)

Updated

9 years ago
Priority: -- → P4
Target Milestone: --- → 3.12.1
(Assignee)

Comment 1

9 years ago
Created attachment 321832 [details] [diff] [review]
Remove dead code
Attachment #321832 - Flags: review?(nelson)
Comment on attachment 321832 [details] [diff] [review]
Remove dead code

r+
Attachment #321832 - Flags: review?(nelson) → review+
(Assignee)

Comment 3

9 years ago
Thanks for the review, Nelson.

Checking in ocsp.c;
/cvsroot/mozilla/security/nss/lib/certhigh/ocsp.c,v  <--  ocsp.c
new revision: 1.51; previous revision: 1.50
done
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.