Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2041)

Unified Diff: chrome/browser/nacl_host/nacl_process_host.cc

Issue 9566008: Fix memory leak in LaunchSelLdr. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/nacl_host/nacl_process_host.cc
===================================================================
--- chrome/browser/nacl_host/nacl_process_host.cc (revision 124403)
+++ chrome/browser/nacl_host/nacl_process_host.cc (working copy)
@@ -392,8 +392,8 @@
if (exe_path.empty())
return false;
- CommandLine* cmd_line = new CommandLine(exe_path);
- nacl::CopyNaClCommandLineArguments(cmd_line);
+ scoped_ptr<CommandLine> cmd_line(new CommandLine(exe_path));
+ nacl::CopyNaClCommandLineArguments(cmd_line.get());
cmd_line->AppendSwitchASCII(switches::kProcessType,
switches::kNaClLoaderProcess);
@@ -410,12 +410,12 @@
return NaClBrokerService::GetInstance()->LaunchLoader(
this, ASCIIToWide(channel_id));
} else {
- process_->Launch(FilePath(), cmd_line);
+ process_->Launch(FilePath(), cmd_line.release());
}
#elif defined(OS_POSIX)
process_->Launch(nacl_loader_prefix.empty(), // use_zygote
base::EnvironmentVector(),
- cmd_line);
+ cmd_line.release());
#endif
return true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698