summaryrefslogtreecommitdiff
path: root/runtime/exec_utils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/exec_utils.cc')
-rw-r--r--runtime/exec_utils.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/exec_utils.cc b/runtime/exec_utils.cc
index dd389f8c97..1021429460 100644
--- a/runtime/exec_utils.cc
+++ b/runtime/exec_utils.cc
@@ -68,6 +68,7 @@ pid_t ExecWithoutWait(const std::vector<std::string>& arg_vector, std::string* e
// Convert the args to char pointers.
const char* program = arg_vector[0].c_str();
std::vector<char*> args;
+ args.reserve(arg_vector.size() + 1);
for (const auto& arg : arg_vector) {
args.push_back(const_cast<char*>(arg.c_str()));
}