Closed
Bug 157927
Opened 22 years ago
Closed 22 years ago
Fix memory leaks in nsNSSCertificate.cpp
Categories
(Core Graveyard :: Security: UI, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: KaiE, Assigned: KaiE)
References
Details
Attachments
(1 file, 2 obsolete files)
12.77 KB,
patch
|
KaiE
:
review+
KaiE
:
superreview+
|
Details | Diff | Splinter Review |
nsNSSCertificate.cpp seems to leak.
I see calls to CERT_GetCommonName or CERT_GetOrgName, and there are probably
many others, where the return code has been allocated by NSS, but PSM fails to
free the memory.
Assignee | ||
Comment 1•22 years ago
|
||
I think I have fixed most of the leaks with the patch for bug 121916.
Keywords: nsbeta1
Assignee | ||
Comment 2•22 years ago
|
||
Wrong bug number in previous statement. Correction:
I think I have fixed most of the leaks with the patch for bug 124037.
Assignee: ssaux → kaie
Depends on: 124037
Assignee | ||
Comment 3•22 years ago
|
||
I looked again, and I actually found more leaks.
In addition, I want to get rid of the compiler warnings PSM produces.
- signed mismatch on comparison
- cleaned up the code in nsNSSCallbacks.cpp to avoid a leak on error
- temporarily #if 0 out more code, sigh. The disabled code was reported as being
defined but unused. There is some code in that file that say "XXX should get
reenabled", but it does not say why. I don't want to remove that code completely
before I have a chance to understand it.
- change a nsXPIDLCString to a nsCString to get rid of an evil looking
"synthesized class for assignment" compiler warning
Status: NEW → ASSIGNED
Assignee | ||
Comment 4•22 years ago
|
||
Assignee | ||
Comment 5•22 years ago
|
||
Assignee | ||
Comment 6•22 years ago
|
||
Javi, can you please review?
Updated•22 years ago
|
Attachment #94215 -
Flags: review+
Comment 7•22 years ago
|
||
Comment on attachment 94215 [details] [diff] [review]
Patch v1 ignoring whitespace, please review this one
r=javi
Is that one chunk in nsNSSIOLayer.cpp that you commented out really not called
from anywhere?
Assignee | ||
Comment 8•22 years ago
|
||
No, that block is not called from anywhere. The single entry point to all the
#ifdef'ed functions is CERT_MatchesScopeOfUse. There are two calls to that
function that are already disabled and marked with "XXX fixme".
Assignee | ||
Comment 9•22 years ago
|
||
Alec, can you please review?
Comment 10•22 years ago
|
||
Comment on attachment 94215 [details] [diff] [review]
Patch v1 ignoring whitespace, please review this one
>Index: mozilla/security/manager/ssl/src/nsKeygenHandler.cpp
>===================================================================
>RCS file: /cvsroot/mozilla/security/manager/ssl/src/nsKeygenHandler.cpp,v
>retrieving revision 1.15
>diff -u -d -w -b -B -r1.15 nsKeygenHandler.cpp
>--- mozilla/security/manager/ssl/src/nsKeygenHandler.cpp 15 May 2002 18:54:55 -0000 1.15
>+++ mozilla/security/manager/ssl/src/nsKeygenHandler.cpp 6 Aug 2002 19:12:20 -0000
>@@ -623,7 +623,6 @@
> nsString& aAttribute)
> {
> nsString selectKey;
>- SECKeySizeChoiceInfo *choice = SECKeySizeChoiceList;
>
> selectKey.Assign(NS_LITERAL_STRING("SELECT"));
> if (Compare(aFormType, NS_LITERAL_STRING("SELECT"),
It looks like selectKey is unused and can be removed.
You could also change
aAttribute.AssignWithConversion(mozKeyGen);
to
aAttribute.Assign(NS_LITERAL_STRING("-mozilla-keygen"));
sr=jag with those change (and without, but since you seem to be doing some
generic clean-up here anyway)
Attachment #94215 -
Flags: superreview+
Assignee | ||
Comment 11•22 years ago
|
||
This patch includes Jag's suggestions.
Attachment #94215 -
Attachment is obsolete: true
Attachment #94216 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Attachment #96440 -
Flags: superreview+
Attachment #96440 -
Flags: review+
Assignee | ||
Comment 12•22 years ago
|
||
Comment on attachment 96440 [details] [diff] [review]
Patch v2
carrying forward reviews
Assignee | ||
Comment 13•22 years ago
|
||
fixed on trunk
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•