filename and prefname strings are leaked in wallet.cpp

RESOLVED WONTFIX

Status

()

Toolkit
Form Manager
P4
normal
RESOLVED WONTFIX
18 years ago
10 years ago

People

(Reporter: Stephen P. Morse, Unassigned)

Tracking

Trunk
x86
Windows NT
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

18 years ago
The following stings in wallet.cpp are leaked:

static const char *pref_WalletExtractTables = "wallet.extractTables";
static const char *pref_Caveat = "wallet.caveat";
static const char *pref_captureForms = "wallet.captureForms";
static const char *pref_enabled = "wallet.enabled";
static const char *pref_WalletNotified = "wallet.Notified";
static const char *pref_WalletSchemaValueFileName ="wallet.SchemaValueFileName";
static const char *pref_WalletServer = "wallet.Server";
static const char *pref_WalletVersion = "wallet.version";
static const char *pref_WalletLastModified = "wallet.lastModified";
(Reporter)

Updated

18 years ago
Status: NEW → ASSIGNED
Whiteboard: [y]
How do any of those leak? Those strings are not allocated, and the pointers are 
const so you can't change them to point to something else. You can't mean the 
data gotten by those prefs because most are boolean prefs that don't cause any 
allocation.

The problem is with char prefs, and as far as I can tell SI_GetCharPref() is 
only used twice (not counting its use in psm-glue where they stole your 
routines)--for schemaValueFileName in wallet.cpp and signonFileName in 
singsign.cpp. It's the char strings pointed at by these two globals that is 
allocated by prefs and never freed.
(Reporter)

Comment 2

18 years ago
Oops, I misunderstood you original complaint in bug 61390 about this leak.  I 
didn't give it too much thought at this time because I was focused on fixing bug 
61390; I simply opened this bug as a reminder.

Yes, you are right -- the only leaks are the pref-names that are assigned to the 
string pointer

  char* schemaValueFileName

There is a similar leak in singsign.cpp for

  char* signonFileName
static const char *pref_WalletExtractTables = "wallet.extractTables";

If this pointer never changes (i.e., if it could be declared static const char
*const pref_WalletExtractTables), then this wastes four bytes (or eight on
alpha) for a pointer, when all that is needed is an array:

static const char pref_WalletExtractTables[] = "wallet.extractTables";

/be
Netscape nav triage team: based on Steve Morse's pretriage recommendation, this 
is not a beta stopper.
Keywords: nsbeta1-
(Reporter)

Updated

18 years ago
Whiteboard: [y]
(Reporter)

Updated

18 years ago
Target Milestone: --- → mozilla1.2
(Reporter)

Updated

16 years ago
Priority: P3 → P4
Target Milestone: mozilla1.2alpha → mozilla1.2beta
(Reporter)

Updated

16 years ago
Target Milestone: mozilla1.2beta → mozilla1.3beta
dveditz is the new module owner, reassigning.
Assignee: morse → dveditz
Status: ASSIGNED → NEW
Keywords: mlk
Target Milestone: mozilla1.3beta → ---
Assignee: dveditz → nobody
Not a memleak, and not a problem with satchel/pwmgr. Wallet is deprecated.
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Keywords: mlk
QA Contact: tpreston → form-manager
Resolution: --- → WONTFIX

Updated

10 years ago
Component: Form Manager → Form Manager
Product: Core → Toolkit
QA Contact: form-manager → form.manager
You need to log in before you can comment on or make changes to this bug.