Bug 980625 - Fix minor leak in PluginModuleChild::Init found by LSAN. r=josh

This commit is contained in:
John Schoenick 2014-03-06 17:02:00 -08:00
parent 168bd00a78
commit 72fc62ad20

View File

@ -169,8 +169,9 @@ PluginModuleChild::Init(const std::string& aPluginFilename,
#if defined(MOZ_X11) || defined(OS_MACOSX)
nsPluginInfo info = nsPluginInfo();
if (NS_FAILED(pluginFile.GetPluginInfo(info, &mLibrary)))
if (NS_FAILED(pluginFile.GetPluginInfo(info, &mLibrary))) {
return false;
}
#if defined(MOZ_X11)
NS_NAMED_LITERAL_CSTRING(flash10Head, "Shockwave Flash 10.");
@ -181,6 +182,8 @@ PluginModuleChild::Init(const std::string& aPluginFilename,
mozilla::plugins::PluginUtilsOSX::SetProcessName(info.fName);
#endif
pluginFile.FreePluginInfo(info);
if (!mLibrary)
#endif
{