summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2014-12-13 17:05:39 +0000
committerJosé Fonseca <jfonseca@vmware.com>2014-12-15 16:35:22 +0000
commit8e6c8be307b6f8a25a363ab4574e3b04a2969e6d (patch)
treea09b8fdf3c0fe579f34f972df9d2a87a657edb57 /cli
parent09519af2056879ce0ea59f7085ac4b282c7d01d0 (diff)
cli: Fix freed pointer deref on trace --debug.
Diffstat (limited to 'cli')
-rw-r--r--cli/cli_trace.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/cli_trace.cpp b/cli/cli_trace.cpp
index b95f0c96..127eaabe 100644
--- a/cli/cli_trace.cpp
+++ b/cli/cli_trace.cpp
@@ -179,6 +179,7 @@ traceProgram(trace::API api,
wrapperPath.append(oldEnvVarValue);
}
+ std::string ex;
if (debug) {
#if defined(__APPLE__)
bool lldb = true;
@@ -213,7 +214,7 @@ traceProgram(trace::API api,
* Debug with GDB.
*/
- std::string ex("set exec-wrapper env " TRACE_VARIABLE "='");
+ ex = "set exec-wrapper env " TRACE_VARIABLE "='";
ex.append(wrapperPath.str());
ex.append("'");