Closed
Bug 587388
Opened 14 years ago
Closed 2 years ago
nssCKFWObject_Create leaks fwObject when nssCKFWInstance_CreateMutex fails
Categories
(NSS :: Libraries, defect)
NSS
Libraries
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: timeless)
Details
(Keywords: coverity, memory-leak)
Attachments
(1 file)
2.64 KB,
patch
|
rrelyea
:
review-
|
Details | Diff | Splinter Review |
fwObject = nss_ZNEW(arena, NSSCKFWObject); ... fwObject->mutex = nssCKFWInstance_CreateMutex(fwInstance, arena, pError); if (!fwObject->mutex) { ... return (NSSCKFWObject *)NULL;
Comment 2•14 years ago
|
||
Comment on attachment 466072 [details] [diff] [review] patch Except for patches to files under /security/nss/lib/ckfw/builtins, patches to files under /security/nss/lib/ckfw should be reviewed by rrelyea.
Attachment #466072 -
Flags: review?(nelson) → review?(rrelyea)
Comment 3•14 years ago
|
||
Comment on attachment 466072 [details] [diff] [review] patch r- It really doesn't work to move allocations forward. In this case we will leak the mutex if we fail to allocate fwobject. Better just to free(fwObject) in the failure case for mutex.
Attachment #466072 -
Flags: review?(rrelyea) → review-
Comment 4•2 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•