Closed Bug 1234822 Opened 8 years ago Closed 8 years ago

[CID 1242821] unused value

Categories

(NSS :: Libraries, defect)

defect
Not set
normal

Tracking

(firefox46 affected)

RESOLVED FIXED
Tracking Status
firefox46 --- affected

People

(Reporter: franziskus, Assigned: franziskus)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, Whiteboard: CID1242821)

Attachments

(1 file, 1 obsolete file)

In pk11util.c:SECMOD_AddNewModuleEx the result value from PK11_UpdateSlotAttribute is not used.
Attached patch Bug1234822.patch (obsolete) — Splinter Review
returning if PK11_UpdateSlotAttribute is not successful. Or does the logic require to go through all slots even if one of them fails?
Attachment #8701459 - Flags: review?(martin.thomson)
Comment on attachment 8701459 [details] [diff] [review]
Bug1234822.patch

Review of attachment 8701459 [details] [diff] [review]:
-----------------------------------------------------------------

::: lib/pk11wrap/pk11util.c
@@ +648,5 @@
>                      if (defaultMechanismFlags & PK11_DISABLE_FLAG) {
>                          PK11_UserDisableSlot(slot);
>                      }
>                  } /* for each slot of this module */
>   		SECMOD_ReleaseReadLock(moduleLock);

Can you provide a patch with enough context to review this please?  Or put it on rietveld.  I notice that you aren't releasing the read lock when this returns, but I can't be sure that it's a problem.
Attachment #8701459 - Flags: review?(martin.thomson)
Attached patch Bug1234822.patchSplinter Review
right, maybe we also should destroy the module?

patch is also here: https://codereview.appspot.com/284090043/
Attachment #8701459 - Attachment is obsolete: true
Attachment #8703525 - Flags: review?(martin.thomson)
Comment on attachment 8703525 [details] [diff] [review]
Bug1234822.patch

Review of attachment 8703525 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for the rietveld version.  And the fixup.
Attachment #8703525 - Flags: review?(martin.thomson) → review+
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.22
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: