Fix for a memory leak. a=waterson,r=dougt
git-svn-id: svn://10.0.0.236/trunk@61455 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -84,10 +84,7 @@ nsPluginsDir::nsPluginsDir(PRUint16 location)
|
||||
const char *pluginsDir = sysdir.GetCString(); // native path
|
||||
if (pluginsDir != NULL)
|
||||
{
|
||||
const char* allocPath;
|
||||
|
||||
allocPath = PL_strdup(pluginsDir);
|
||||
*(nsFileSpec*)this = allocPath;
|
||||
*(nsFileSpec*)this = pluginsDir;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -84,10 +84,7 @@ nsPluginsDir::nsPluginsDir(PRUint16 location)
|
||||
const char *pluginsDir = sysdir.GetCString(); // native path
|
||||
if (pluginsDir != NULL)
|
||||
{
|
||||
const char* allocPath;
|
||||
|
||||
allocPath = PL_strdup(pluginsDir);
|
||||
*(nsFileSpec*)this = allocPath;
|
||||
*(nsFileSpec*)this = pluginsDir;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user