fix leak in child process

This commit is contained in:
Chris Cromer 2021-07-06 23:35:13 -04:00
parent f45a93cfdd
commit fd4fd05f2c

View File

@ -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) {