Fixed memory leak (though not so interesting, since the strace would
exit in this case anyway). CID 985. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25640 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -217,8 +217,10 @@ load_program(const char *const *args, int32 argCount, bool traceLoading)
|
|||||||
// resolve the program path
|
// resolve the program path
|
||||||
string programPath;
|
string programPath;
|
||||||
status_t error = find_program(args[0], programPath);
|
status_t error = find_program(args[0], programPath);
|
||||||
if (error != B_OK)
|
if (error != B_OK) {
|
||||||
|
delete[] mutableArgs;
|
||||||
return error;
|
return error;
|
||||||
|
}
|
||||||
mutableArgs[0] = programPath.c_str();
|
mutableArgs[0] = programPath.c_str();
|
||||||
|
|
||||||
// count environment variables
|
// count environment variables
|
||||||
|
|||||||
Reference in New Issue
Block a user