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:
parent
cefcb7b41c
commit
a1e3759f69
@ -1012,12 +1012,15 @@ create_team_arg(struct team_arg **_teamArg, int32 argCount, char * const *args,
|
||||
// copy the args over
|
||||
|
||||
status = copy_strings_array(args, argCount, &argsCopy, kernel);
|
||||
if (status != B_OK)
|
||||
if (status != B_OK) {
|
||||
free(teamArg);
|
||||
return status;
|
||||
}
|
||||
|
||||
status = copy_strings_array(env, envCount, &envCopy, kernel);
|
||||
if (status != B_OK) {
|
||||
free_strings_array(argsCopy, argCount);
|
||||
free(teamArg);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user