Closed Bug 13299 Opened 26 years ago Closed 26 years ago

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

Categories

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

x86
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: bruce, Assigned: serhunt)

References

Details

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]
Summary: MLK: nsPluginsDir::nsPluginsDir() → MLK: -leak of 40 bytes - nsPluginsDir::nsPluginsDir()
Blocks: 14516
QA Contact: beppe → elig
Assignee: av → mccabe
Component: Plug-ins → Javascript Engine
PL_strdup now gone from the plugin code. Reassigning to the next owner.
Assignee: mccabe → av
Component: Javascript Engine → Plug-ins
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.
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
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.
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...)
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)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Re-opening for Andrei to comment on Bruce's comment. (Andrei, please feel free to either mark as Verified, or leave re-opened.) Thanks!
Status: REOPENED → RESOLVED
Closed: 26 years ago26 years ago
Resolution: --- → FIXED
This strdup is allright. It is going to be freed when the object is gone.
Status: RESOLVED → VERIFIED
Marking as verified; thanks Andrei & Bruce!
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.