diff --git a/src/dir_scan.c b/src/dir_scan.c index 9483d01..442c4a2 100644 --- a/src/dir_scan.c +++ b/src/dir_scan.c @@ -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; }