dir_scan: Avoid allocating new copies of buf_dir
This allocation is currently leaked, but as long as we don't allocate new ones for each refresh, that shouldn't be much of an issue. (cherry picked from commit 9dc2d32a8fb557112f8f96cd14d50b934543ce39)
Этот коммит содержится в:
родитель
8e021a46ee
Коммит
ec0de4afa8
@ -312,6 +312,7 @@ void dir_scan_init(const char *path) {
|
||||
dir_setlasterr(NULL);
|
||||
dir_seterr(NULL);
|
||||
dir_process = process;
|
||||
buf_dir = malloc(dir_memsize(""));
|
||||
if (!buf_dir)
|
||||
buf_dir = malloc(dir_memsize(""));
|
||||
pstate = ST_CALC;
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user