diff options
author | José Fonseca <jfonseca@vmware.com> | 2014-12-13 17:05:39 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2014-12-15 16:35:22 +0000 |
commit | 8e6c8be307b6f8a25a363ab4574e3b04a2969e6d (patch) | |
tree | a09b8fdf3c0fe579f34f972df9d2a87a657edb57 /cli | |
parent | 09519af2056879ce0ea59f7085ac4b282c7d01d0 (diff) |
cli: Fix freed pointer deref on trace --debug.
Diffstat (limited to 'cli')
-rw-r--r-- | cli/cli_trace.cpp | 3 |
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("'"); |