From 72fc62ad206245c6b1c8db95924d906459e33e83 Mon Sep 17 00:00:00 2001 From: John Schoenick Date: Thu, 6 Mar 2014 17:02:00 -0800 Subject: [PATCH] Bug 980625 - Fix minor leak in PluginModuleChild::Init found by LSAN. r=josh --- dom/plugins/ipc/PluginModuleChild.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dom/plugins/ipc/PluginModuleChild.cpp b/dom/plugins/ipc/PluginModuleChild.cpp index d8fe0ad2cac..04302b5e62a 100644 --- a/dom/plugins/ipc/PluginModuleChild.cpp +++ b/dom/plugins/ipc/PluginModuleChild.cpp @@ -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 {