summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-04-26 13:15:53 +0200
committerYorhel <git@yorhel.nl>2009-04-26 13:15:53 +0200
commit91b131a0805a6932fa48255473b1edaa3bf031a1 (patch)
tree089c2722a0d5f25ac1ffb781f9a79f1a372314a4
parentece21a668d43dac69c25315a22f1f7d0147f7198 (diff)
Fixed segault after finishing calculation
Bug introduced in 796d043c0df84fd0cb470c0bda9bacd2d39f9d14 Apparently I was still sleeping or something...
-rw-r--r--src/calc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/calc.c b/src/calc.c
index 79bd4ec..2be704c 100644
--- a/src/calc.c
+++ b/src/calc.c
@@ -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))