diff options
author | Yorhel <git@yorhel.nl> | 2009-04-26 13:15:53 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-04-26 13:15:53 +0200 |
commit | 91b131a0805a6932fa48255473b1edaa3bf031a1 (patch) | |
tree | 089c2722a0d5f25ac1ffb781f9a79f1a372314a4 | |
parent | ece21a668d43dac69c25315a22f1f7d0147f7198 (diff) |
Fixed segault after finishing calculation
Bug introduced in 796d043c0df84fd0cb470c0bda9bacd2d39f9d14
Apparently I was still sleeping or something...
-rw-r--r-- | src/calc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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)) |