Skip to content
Snippets Groups Projects
Commit 91b131a0 authored by Yorhel's avatar Yorhel
Browse files

Fixed segault after finishing calculation

Bug introduced in 796d043c
Apparently I was still sleeping or something...
parent ece21a66
Branches
No related tags found
No related merge requests found
......@@ -367,9 +367,9 @@ void calc_process() {
/* start calculating */
if(!calc_dir(root, name) && !failed) {
free(path);
if(!path[1] && strcmp(name, "."))
free(name);
free(path);
if(root->sub == NULL) {
freedir(root);
failed = 1;
......@@ -403,9 +403,9 @@ void calc_process() {
}
/* something went wrong... */
free(path);
if(!path[1] && strcmp(name, "."))
free(name);
free(path);
freedir(root);
calc_fail:
while(failed && !input_handle(0))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment