vfychain.main leaks memory

RESOLVED FIXED in 3.12

Status

NSS
Libraries
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: Alexei Volkov, Assigned: Alexei Volkov)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

9 years ago
Created attachment 316100 [details] [diff] [review]
Use PORT_Free to deallocate the memory.

Function main leaks memory allocated to keep data for certDir, progName, oidStr, revConfig and password.
Attachment #316100 - Flags: review?(nelson)
Comment on attachment 316100 [details] [diff] [review]
Use PORT_Free to deallocate the memory.

>+    if (progName)
>+        PORT_Free(progName);
>+    if (certDir)
>+        PORT_Free(certDir);
>+    if (oidStr)
>+        PORT_Free(oidStr);
>+    if (revConfig) 
>+        PORT_Free(revConfig);
>+    if (password)
>+        PORT_Free(password);

PORT_Free checks its argument for NULL, making the checks added above 
redundant.  I'd prefer not to have those redundant checks.
Comment on attachment 316100 [details] [diff] [review]
Use PORT_Free to deallocate the memory.

r+ once the redundant checks are removed.
Attachment #316100 - Flags: review?(nelson) → review+
(Assignee)

Comment 3

9 years ago
Patch is integrated.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.