Commit 33a05afb authored by halyavin@google.com's avatar halyavin@google.com

Fix memory leak in LaunchSelLdr.

BUG= 116383
TEST= none

Review URL: http://codereview.chromium.org/9566008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124686 0039d316-1c4b-4281-b951-d872f2087c98
parent 31028f64
...@@ -392,8 +392,8 @@ bool NaClProcessHost::LaunchSelLdr() { ...@@ -392,8 +392,8 @@ bool NaClProcessHost::LaunchSelLdr() {
if (exe_path.empty()) if (exe_path.empty())
return false; return false;
CommandLine* cmd_line = new CommandLine(exe_path); scoped_ptr<CommandLine> cmd_line(new CommandLine(exe_path));
nacl::CopyNaClCommandLineArguments(cmd_line); nacl::CopyNaClCommandLineArguments(cmd_line.get());
cmd_line->AppendSwitchASCII(switches::kProcessType, cmd_line->AppendSwitchASCII(switches::kProcessType,
switches::kNaClLoaderProcess); switches::kNaClLoaderProcess);
...@@ -410,12 +410,12 @@ bool NaClProcessHost::LaunchSelLdr() { ...@@ -410,12 +410,12 @@ bool NaClProcessHost::LaunchSelLdr() {
return NaClBrokerService::GetInstance()->LaunchLoader( return NaClBrokerService::GetInstance()->LaunchLoader(
this, ASCIIToWide(channel_id)); this, ASCIIToWide(channel_id));
} else { } else {
process_->Launch(FilePath(), cmd_line); process_->Launch(FilePath(), cmd_line.release());
} }
#elif defined(OS_POSIX) #elif defined(OS_POSIX)
process_->Launch(nacl_loader_prefix.empty(), // use_zygote process_->Launch(nacl_loader_prefix.empty(), // use_zygote
base::EnvironmentVector(), base::EnvironmentVector(),
cmd_line); cmd_line.release());
#endif #endif
return true; return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment