MLK: -leak of 40 bytes - nsPluginsDir::nsPluginsDir()

VERIFIED FIXED

Status

()

Core
Plug-ins
P3
normal
VERIFIED FIXED
19 years ago
18 years ago

People

(Reporter: Bruce Mitchener, Assigned: av (gone))

Tracking

Trunk
x86
Windows NT
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

19 years ago
PL_strdup() at:
146       allocPath = PL_strdup(path);
147       *(nsFileSpec*)this = allocPath;

and later the same chunk of code again.  None appear to get free'd correctly.

[W] MLK: Memory leak of 40 bytes from 1 block allocated in PL_strdup
        Distribution of leaked blocks
                40 bytes from 1 block of 40 bytes (0x0387ed40) allocation number
48734
        Allocation location
            malloc         [dbgheap.c:129]
            PL_strdup      [strdup.c:30]
            nsPluginsDir::nsPluginsDir(void) [nsPluginsDirWin.cpp:146]
            nsPluginHostImpl::LoadPlugins(void) [nsPluginHostImpl.cpp:2246]
            nsPluginHostImpl::GetPluginFactory(char const*,nsIPlugin * *)
[nsPluginHostImpl.cpp:2187]
            nsJVMManager::StartupJVM(void) [nsJVMManager.cpp:569]
            nsJVMManager::MaybeStartupLiveConnect(void) [nsJVMManager.cpp:705]
            nsJVMManager::StartupLiveConnect(JSRuntime *,int&)
[nsJVMManager.h:124]
            nsJSEnvironment::nsJSEnvironment(void) [nsJSEnvironment.cpp:452]
            nsJSEnvironment::GetScriptingEnvironment(void)
[nsJSEnvironment.cpp:419]
            NS_CreateScriptContext [nsJSEnvironment.cpp:485]
            nsWebShell::CreateScriptEnvironment(void) [nsWebShell.cpp:3338]
            nsWebShell::GetScriptGlobalObject(nsIScriptGlobalObject * *)
[nsWebShell.cpp:3366]
            DocumentViewerImpl::Init(void *,nsIDeviceContext *,nsIPref *,nsRect
const&,nsScrollPreference) [nsDocumentViewer.cpp:374]
            nsWebShell::Embed(nsIContentViewer *,char const*,nsISupports *)
[nsWebShell.cpp:986]

Updated

19 years ago
Summary: MLK: nsPluginsDir::nsPluginsDir() → MLK: -leak of 40 bytes - nsPluginsDir::nsPluginsDir()

Updated

19 years ago
Blocks: 14516

Updated

19 years ago
QA Contact: beppe → elig
(Assignee)

Updated

19 years ago
Assignee: av → mccabe
Component: Plug-ins → Javascript Engine
(Assignee)

Comment 1

19 years ago
PL_strdup now gone from the plugin code. Reassigning to the next owner.

Updated

18 years ago
Assignee: mccabe → av
Component: Javascript Engine → Plug-ins

Comment 2

18 years ago
hmm, av, we're not sure how this is a javascript bug at all.  if you reassign
back can you say why?

or maybe bruce can re-verify that this exists, in light of av's change.
(Assignee)

Updated

18 years ago
Status: NEW → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
(Assignee)

Comment 3

18 years ago
OK, I did not realize this was a call stack rather than just grep on strdup. Eli
I am marking this fixed, somebody needs to run Purify to verify this.

Comment 4

18 years ago
Mr. Bruce, might you be interested in doing the verification on this? Otherwise,
will have to rubber-stamp verified. (QA doesn't have access to Purify. And,
besides, you're the master...)
(Reporter)

Comment 5

18 years ago
Looks like a valid fix for that line.  But, look at
http://lxr.mozilla.org/seamonkey/source/modules/plugin/nglsrc/nsPluginsDirWin.cp
p#178 for another instance of this. (I think)

Updated

18 years ago
Status: RESOLVED → REOPENED

Updated

18 years ago
Resolution: FIXED → ---

Comment 6

18 years ago
Re-opening for Andrei to comment on Bruce's comment. (Andrei, please feel free to
either mark as Verified, or leave re-opened.)

Thanks!
(Assignee)

Updated

18 years ago
Status: REOPENED → RESOLVED
Last Resolved: 18 years ago18 years ago
Resolution: --- → FIXED
(Assignee)

Comment 7

18 years ago
This strdup is allright. It is going to be freed when the object is gone.

Updated

18 years ago
Status: RESOLVED → VERIFIED

Comment 8

18 years ago
Marking as verified; thanks Andrei & Bruce!
You need to log in before you can comment on or make changes to this bug.