Last Comment Bug 429388 - vfychain.main leaks memory
: vfychain.main leaks memory
Status: RESOLVED FIXED
:
Product: NSS
Classification: Components
Component: Libraries (show other bugs)
: 3.12
: All All
: -- normal (vote)
: 3.12
Assigned To: Alexei Volkov
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-16 13:57 PDT by Alexei Volkov
Modified: 2008-04-17 10:31 PDT (History)
0 users
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Use PORT_Free to deallocate the memory. (1.22 KB, patch)
2008-04-16 13:57 PDT, Alexei Volkov
nelson: review+
Details | Diff | Review

Description Alexei Volkov 2008-04-16 13:57:39 PDT
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.
Comment 1 Nelson Bolyard (seldom reads bugmail) 2008-04-16 14:27:41 PDT
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 2 Nelson Bolyard (seldom reads bugmail) 2008-04-16 14:39:55 PDT
Comment on attachment 316100 [details] [diff] [review]
Use PORT_Free to deallocate the memory.

r+ once the redundant checks are removed.
Comment 3 Alexei Volkov 2008-04-17 10:31:29 PDT
Patch is integrated.

Note You need to log in before you can comment on or make changes to this bug.