Closed
Bug 341121
Opened 19 years ago
Closed 18 years ago
Coverity 408 sec_PKCS7CreateEncryptObject leaks param & result
Categories
(NSS :: Libraries, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
3.11.7
People
(Reporter: nelson, Assigned: rrelyea)
Details
(Keywords: coverity, memory-leak, Whiteboard: [CID 408 409])
Attachments
(1 file)
508 bytes,
patch
|
alvolkov.bgs
:
review+
nelson
:
superreview+
|
Details | Diff | Splinter Review |
In sec_PKCS7CreateEncryptObject, the param allocated here is never freed.
251 } else {
252 mechanism = PK11_AlgtagToMechanism(algtag);
253 param = PK11_GenerateNewParam(mechanism,key);
Reporter | ||
Updated•19 years ago
|
Priority: -- → P2
Whiteboard: CID 408
Target Milestone: --- → 3.11.3
Reporter | ||
Comment 1•19 years ago
|
||
CID 409. The same function also leaks "result". Allocated here:
207 result = (struct sec_pkcs7_cipher_object*)
208 PORT_ZAlloc (sizeof(struct sec_pkcs7_cipher_object));
leaked here
280 if(rv != SECSuccess) {
281 return NULL;
282 }
Summary: Coverity 408 sec_PKCS7CreateEncryptObject leaks param → Coverity 408 sec_PKCS7CreateEncryptObject leaks param & result
Whiteboard: CID 408 → [CID 408 409]
Assignee | ||
Comment 2•18 years ago
|
||
reviewers feel free to bounce the review to someone else if you are overloaded.
The patch is fairly straightforward.
Attachment #264175 -
Flags: superreview?(nelson)
Attachment #264175 -
Flags: review?(alexei.volkov.bugs)
Reporter | ||
Comment 3•18 years ago
|
||
Comment on attachment 264175 [details] [diff] [review]
Free result and param on the error path.
looks right to me.
Attachment #264175 -
Flags: superreview?(nelson) → superreview+
Comment 4•18 years ago
|
||
Comment on attachment 264175 [details] [diff] [review]
Free result and param on the error path.
r=alexei.volkov
Attachment #264175 -
Flags: review?(alexei.volkov.bugs) → review+
Reporter | ||
Comment 5•18 years ago
|
||
Bob made this checkin today.
cvs commit: Examining .
Checking in p7local.c;
/cvsroot/mozilla/security/nss/lib/pkcs7/p7local.c,v <-- p7local.c
new revision: 1.8.2.1; previous revision: 1.8
done
Checking in p7local.c;
/cvsroot/mozilla/security/nss/lib/pkcs7/p7local.c,v <-- p7local.c
new revision: 1.9; previous revision: 1.8
done
Checked in tip an branch.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Target Milestone: 3.11.3 → 3.11.7
You need to log in
before you can comment on or make changes to this bug.
Description
•