diff --git a/qtfs/qtfs_server/fsops.c b/qtfs/qtfs_server/fsops.c index c1705d64524f326c3a33ce83feb3ab27f9753b46..32624e83c08d98139c9fa33bcdf761e88c0fce83 100644 --- a/qtfs/qtfs_server/fsops.c +++ b/qtfs/qtfs_server/fsops.c @@ -49,7 +49,9 @@ bool in_white_list(char *path, int type) { int i, in_wl = -1; + read_lock(&g_whitelist_lock); if (!g_whitelist[type]) { + read_unlock(&g_whitelist_lock); return true; } for (i = 0; i < g_whitelist[type]->len; i++) { @@ -58,6 +60,7 @@ bool in_white_list(char *path, int type) break; } } + read_unlock(&g_whitelist_lock); return in_wl != -1; }