Closed Bug 1219596 Opened 9 years ago Closed 9 years ago

[CID 222146] leaked_storage: Variable instance going out of scope leaks the storage it points to

Categories

(NSS :: Libraries, defect)

defect
Not set
normal

Tracking

(firefox44 affected)

RESOLVED DUPLICATE of bug 1209918
Tracking Status
firefox44 --- affected

People

(Reporter: franziskus, Assigned: franziskus)

References

(Blocks 1 open bug)

Details

(Keywords: coverity)

Attachments

(1 file, 1 obsolete file)

Variable instance doesn't get freed in case context = c->object.cryptoContext is not NULL in fill_CERTCertificateFields (pki3hack.c).
Attached patch free instance (obsolete) — Splinter Review
Attachment #8680637 - Flags: review?(martin.thomson)
Comment on attachment 8680637 [details] [diff] [review] free instance Review of attachment 8680637 [details] [diff] [review]: ----------------------------------------------------------------- ::: lib/pki/pki3hack.c @@ +830,5 @@ > cc->trust = trust; > CERT_UnlockCertTrust(cc); > } > nssCryptokiObject_Destroy(instance); > + instance = NULL; I'd just delete these two lines and rely on the cleanup instead.
Attachment #8680637 - Flags: review?(martin.thomson)
Attached patch free instanceSplinter Review
removed the first destroy, only doing clean up at the end now.
Attachment #8680637 - Attachment is obsolete: true
Attachment #8686006 - Flags: review?(martin.thomson)
Comment on attachment 8686006 [details] [diff] [review] free instance Review of attachment 8686006 [details] [diff] [review]: ----------------------------------------------------------------- Can you put this on Rietveld pls.
Attachment #8686006 - Flags: review?(martin.thomson) → review?(ekr)
patch is also on Rietveld now https://codereview.appspot.com/278880043
Flags: needinfo?(ekr)
This seems to have landed, right?
Flags: needinfo?(ekr) → needinfo?(franziskuskiefer)
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(franziskuskiefer)
Resolution: --- → DUPLICATE
Attachment #8686006 - Flags: review?(ekr)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: