Memory leak in error cases. CID 808.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25644 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1012,12 +1012,15 @@ create_team_arg(struct team_arg **_teamArg, int32 argCount, char * const *args,
|
|||||||
// copy the args over
|
// copy the args over
|
||||||
|
|
||||||
status = copy_strings_array(args, argCount, &argsCopy, kernel);
|
status = copy_strings_array(args, argCount, &argsCopy, kernel);
|
||||||
if (status != B_OK)
|
if (status != B_OK) {
|
||||||
|
free(teamArg);
|
||||||
return status;
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
status = copy_strings_array(env, envCount, &envCopy, kernel);
|
status = copy_strings_array(env, envCount, &envCopy, kernel);
|
||||||
if (status != B_OK) {
|
if (status != B_OK) {
|
||||||
free_strings_array(argsCopy, argCount);
|
free_strings_array(argsCopy, argCount);
|
||||||
|
free(teamArg);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user