From 501064da104d2d757e3c158388969847d1bad59c Mon Sep 17 00:00:00 2001 From: Yatao Li Date: Sun, 23 Jan 2022 00:41:13 +0800 Subject: [PATCH] parse: fix full scan regression --- src/parsing/parse.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/parsing/parse.c b/src/parsing/parse.c index 7394c5f..b09ec4f 100644 --- a/src/parsing/parse.c +++ b/src/parsing/parse.c @@ -89,9 +89,11 @@ void parse(void *arg) { return; } - pthread_mutex_lock(&ScanCtx.copy_table_mu); - incremental_mark_file(ScanCtx.new_table, doc->path_md5); - pthread_mutex_unlock(&ScanCtx.copy_table_mu); + if (ScanCtx.new_table != NULL) { + pthread_mutex_lock(&ScanCtx.copy_table_mu); + incremental_mark_file(ScanCtx.new_table, doc->path_md5); + pthread_mutex_unlock(&ScanCtx.copy_table_mu); + } char *buf[MAGIC_BUF_SIZE];