Closed Bug 125790 Opened 23 years ago Closed 23 years ago

selfserv leaks the 'nickName' and 'passwd' strings

Categories

(NSS :: Tools, defect, P2)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wtc, Assigned: wtc)

Details

Attachments

(1 file)

The main() function of selfserv.c calls strdup() to allocate
the 'nickName' and 'passwd' strings, but they are not freed.
Attached patch Proposed patchSplinter Review
I free these two strings right before NSS_Shutdown(), assuming NSS
does not hold references to the nickName and passwd strings.  Is
that okay, or should I free them after NSS_Shutdown()?

Two notes:
1. free() is used to free strings allocated by strdup().
2. I did not bother to check nickName and passwd for NULL.  Passing
NULL to free() is a no-op.
Fix checked in. (r=mcgreer)
Severity: normal → minor
Status: NEW → RESOLVED
Closed: 23 years ago
Priority: -- → P2
Resolution: --- → FIXED
Target Milestone: --- → 3.4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: