From 16db3cc595ab34f21a747d88fb9cdd340ac438f9 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 24 Jul 2009 12:15:57 +0200 Subject: remove superfluous copying in ExecVP params Signed-off-by: Denys Vlasenko --- lib/Plugins/CCpp.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/Plugins') diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp index f7293265..bf6b2b04 100644 --- a/lib/Plugins/CCpp.cpp +++ b/lib/Plugins/CCpp.cpp @@ -230,9 +230,8 @@ void CAnalyzerCCpp::GetBacktrace(const std::string& pDebugDumpDir, std::string& } char* command = (char*)"gdb"; char* args[5] = { (char*)"gdb", (char*)"-batch", (char*)"-x", NULL, NULL }; - args[3] = strdup(tmpFile.c_str()); - ExecVP(command, args, UID, pBacktrace); - free(args[3]); + args[3] = (char*) tmpFile.c_str(); + ExecVP(command, args, atoi(UID.c_str()), pBacktrace); } void CAnalyzerCCpp::GetIndependentBacktrace(const std::string& pBacktrace, std::string& pIndependentBacktrace) -- cgit