Status

NSS
Libraries
RESOLVED DUPLICATE of bug 1317118
a year ago
a year ago

People

(Reporter: njn, Assigned: njn)

Tracking

({coverity})

trunk
coverity

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [CID 1369095, CID 1369096])

Attachments

(1 attachment)

(Assignee)

Description

a year ago
Coverity is reporting some problems in CertReq(): two resource leaks in error paths, and a missing failure check.
(Assignee)

Comment 1

a year ago
Created attachment 8785729 [details] [diff] [review]
Fix minor resource leaks and a missing failure check in CertReq
Attachment #8785729 - Flags: review?(martin.thomson)
(Assignee)

Updated

a year ago
Assignee: nobody → n.nethercote
Status: NEW → ASSIGNED
Comment on attachment 8785729 [details] [diff] [review]
Fix minor resource leaks and a missing failure check in CertReq

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

I think that I might have seen a similar patch for the same problems elsewhere.
Attachment #8785729 - Flags: superreview?(franziskuskiefer)
Attachment #8785729 - Flags: review?(martin.thomson)
Attachment #8785729 - Flags: review+
Comment on attachment 8785729 [details] [diff] [review]
Fix minor resource leaks and a missing failure check in CertReq

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

Yeah, parts of this were fixed already. The patch should end up with only the first change after rebasing.

::: security/nss/cmd/certutil/certutil.c
@@ +217,5 @@
> +        if (rv != SECSuccess) {
> +            SECU_PrintError(progName, "Could not set signature algorithm id.");
> +            PORT_FreeArena(arena, PR_FALSE);
> +            return SECFailure;
> +        }

this got fixed already

@@ +225,5 @@
>      cr = CERT_CreateCertificateRequest(subject, spki, NULL);
>      SECKEY_DestroySubjectPublicKeyInfo(spki);
>      if (!cr) {
>          SECU_PrintError(progName, "unable to make certificate request");
> +        PORT_FreeArena(arena, PR_FALSE);

this one as well
Attachment #8785729 - Flags: superreview?(franziskuskiefer) → superreview+
(Assignee)

Comment 4

a year ago
Does this still need to be open?
This got fixed in bug 1317118
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1317118
You need to log in before you can comment on or make changes to this bug.