Fixed another memory allocation issue
Этот коммит содержится в:
родитель
027c0c2eba
Коммит
c079e0d23a
@ -342,10 +342,16 @@ void calc_process() {
|
||||
}
|
||||
root = t;
|
||||
curdev = fs.st_dev;
|
||||
free(path);
|
||||
|
||||
/* start calculating */
|
||||
if(!calc_dir(root, name) && !failed) {
|
||||
free(path);
|
||||
if(root->sub == NULL) {
|
||||
freedir(root);
|
||||
failed = 1;
|
||||
strcpy(errmsg, "Directory empty.");
|
||||
goto calc_fail;
|
||||
}
|
||||
browse_init(root->sub);
|
||||
|
||||
/* update references and free original item */
|
||||
@ -373,6 +379,7 @@ void calc_process() {
|
||||
}
|
||||
|
||||
/* something went wrong... */
|
||||
free(path);
|
||||
freedir(root);
|
||||
calc_fail:
|
||||
while(failed && !input_handle(0))
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user