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]
PL_strdup now gone from the plugin code. Reassigning to the next owner.
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)
Re-opening for Andrei to comment on Bruce's comment. (Andrei, please feel free to either mark as Verified, or leave re-opened.) Thanks!
This strdup is allright. It is going to be freed when the object is gone.
Marking as verified; thanks Andrei & Bruce!