mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-13 01:08:41 -09:00
Fixed segault after finishing calculation
Bug introduced in 796d043c0d
Apparently I was still sleeping or something...
This commit is contained in:
parent
ece21a668d
commit
91b131a080
1 changed files with 2 additions and 2 deletions
|
|
@ -367,9 +367,9 @@ void calc_process() {
|
||||||
|
|
||||||
/* start calculating */
|
/* start calculating */
|
||||||
if(!calc_dir(root, name) && !failed) {
|
if(!calc_dir(root, name) && !failed) {
|
||||||
free(path);
|
|
||||||
if(!path[1] && strcmp(name, "."))
|
if(!path[1] && strcmp(name, "."))
|
||||||
free(name);
|
free(name);
|
||||||
|
free(path);
|
||||||
if(root->sub == NULL) {
|
if(root->sub == NULL) {
|
||||||
freedir(root);
|
freedir(root);
|
||||||
failed = 1;
|
failed = 1;
|
||||||
|
|
@ -403,9 +403,9 @@ void calc_process() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* something went wrong... */
|
/* something went wrong... */
|
||||||
|
free(path);
|
||||||
if(!path[1] && strcmp(name, "."))
|
if(!path[1] && strcmp(name, "."))
|
||||||
free(name);
|
free(name);
|
||||||
free(path);
|
|
||||||
freedir(root);
|
freedir(root);
|
||||||
calc_fail:
|
calc_fail:
|
||||||
while(failed && !input_handle(0))
|
while(failed && !input_handle(0))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue