From f92a3695b384fab83ebef483058c236b5082da40 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 13 Jan 2025 13:54:42 +0300 Subject: [PATCH] filesystem: fix fd leak in Platform_GetDirectoryCaseSensitivity --- filesystem/dir.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/filesystem/dir.c b/filesystem/dir.c index 22ce835b..622caf54 100644 --- a/filesystem/dir.c +++ b/filesystem/dir.c @@ -66,7 +66,10 @@ static qboolean Platform_GetDirectoryCaseSensitivity( const char *dir ) return true; if( ioctl( fd, FS_IOC_GETFLAGS, &flags ) < 0 ) + { + close( fd ); return true; + } close( fd );