2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 01:45:19 +01:00

filesystem: fix possible NULL dereference

This commit is contained in:
Alibek Omarov 2024-04-04 18:41:22 +03:00
parent fed65dd497
commit f995d055b5

View File

@ -320,6 +320,12 @@ public:
return nullptr; return nullptr;
state = new CSearchState( &searchHead, search ); state = new CSearchState( &searchHead, search );
if( !state )
{
Mem_Free( search );
return nullptr;
}
*handle = state->handle; *handle = state->handle;
return state->search->filenames[0]; return state->search->filenames[0];
} }