fix memory leak

This commit is contained in:
Chris Cromer 2021-07-17 16:54:00 -04:00
parent f580c03ebc
commit 13d46e8c60

View File

@ -49,7 +49,9 @@ void loop() {
clean.size = 0; clean.size = 0;
variables = create_array_list(); variables = create_array_list();
atexit(exit_cleanup); atexit(exit_cleanup);
set_array_list(variables, "PWD", get_working_directory()); char *cwd = get_working_directory();
set_array_list(variables, "PWD", cwd);
free(cwd);
while (1) { while (1) {
print_input_line(); print_input_line();