filesystem: fix possible NULL dereference
This commit is contained in:
parent
fed65dd497
commit
f995d055b5
1 changed files with 6 additions and 0 deletions
|
@ -320,6 +320,12 @@ public:
|
|||
return nullptr;
|
||||
|
||||
state = new CSearchState( &searchHead, search );
|
||||
if( !state )
|
||||
{
|
||||
Mem_Free( search );
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
*handle = state->handle;
|
||||
return state->search->filenames[0];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue