Closed Bug 23546 Opened 26 years ago Closed 26 years ago

nsPluginsDir::nsPluginsDir()

Categories

(Core Graveyard :: Plug-ins, defect, P3)

x86
Linux
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: bruce, Assigned: bruce)

Details

Attachments

(1 file)

const char* allocPath; allocPath = PL_strdup(pluginsDir); *(nsFileSpec*)this = allocPath; This leaks the allocPath. I reported this for Windows and the PL_strdup() was removed. This should be done here as well (just do: *(nsFileSpec*)this = pluginsDir; and get rid of allocPath altogether). Would be good to look at Mac and other platforms as well probably.
Does av@netscape.com still work there? This is a _very_ easy fix and hasn't been touched in over a month.
I do. And I will look at this and other issue as soon as I finish my PDT+ bugs.
Status: NEW → ASSIGNED
I'll be happy to take this on, test the fix under Purify, and get it approved and checked in then. Assign it over to me if you like.
Thanks! Gladly doing so. Any other help especially with Unix and Mac would be greately appreciated.
Assignee: av → bruce
Status: ASSIGNED → NEW
Attached patch Fixes leak.Splinter Review
Doug, please review this ... I tested it under Purify and it works fine. Thanks!
Status: NEW → ASSIGNED
looks good.
And fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
If you have to cast, a |NS_STATIC_CAST| would be better. However, the result (and hence, your meaning) might be made clearer by saying this->nsFileSpec::operator=(pluginsDir);
this was fixed.
Status: RESOLVED → VERIFIED
It looks like my legacy plugin check-in way back when did an override of Bruces fix. Can I get the OK to fix this by getting rid of the strdup?
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
yea, forgot the cc
fixed rechecked in.
Status: REOPENED → RESOLVED
Closed: 26 years ago26 years ago
Resolution: --- → FIXED
verified that the fix is in the tree.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: