Patch fuite de mémoire
This commit is contained in:
parent
7a05a3fb5f
commit
adf0649a91
1 changed files with 7 additions and 0 deletions
|
@ -80,7 +80,14 @@ int main()
|
||||||
|
|
||||||
get_command(commands, '|');
|
get_command(commands, '|');
|
||||||
if (pipe(my_pipe) == -1)
|
if (pipe(my_pipe) == -1)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < MAX_LENGTH; i++)
|
||||||
|
{
|
||||||
|
free(args[i]);
|
||||||
|
free(commands[i]);
|
||||||
|
}
|
||||||
error(1, FATAL_ERROR, NULL);
|
error(1, FATAL_ERROR, NULL);
|
||||||
|
}
|
||||||
index = 0;
|
index = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue