Fix leak of pluginFileInDirectory objects from ScanPluginsDirectory(). Patch by dbradley@netscape.com, r=peterl, sr=me.

This commit is contained in:
bryner%netscape.com 2003-04-08 02:49:26 +00:00
parent 646b3a67ec
commit fbaaafee40

View File

@ -4885,11 +4885,11 @@ nsresult nsPluginHostImpl::ScanPluginsDirectory(nsIFile * pluginsDir,
nsCOMPtr <nsILocalFile> localfile = do_QueryInterface(file);
localfile->InitWithPath(pfd->mFilename);
PRInt64 fileModTime = pfd->mModTime;
//delete pfd;
// Look for it in our cache
nsPluginTag *pluginTag = RemoveCachedPluginsInfo(NS_ConvertUCS2toUTF8(pfd->mFilename).get());
delete pfd;
if (pluginTag) {
// If plugin changed, delete cachedPluginTag and dont use cache
if (LL_NE(fileModTime, pluginTag->mLastModifiedTime)) {