fix leak in child process
This commit is contained in:
parent
f45a93cfdd
commit
fd4fd05f2c
@ -39,6 +39,7 @@ void launch_program(StringArray *args) {
|
||||
|
||||
execvp(args->array[0], argv);
|
||||
fprintf(stderr, "%s: command not found\n", args->array[0]);
|
||||
free_string_array(args);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
else if (child < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user